Android.bp 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. // Copyright (C) 2018 The Android Open Source Project
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package {
  15. default_applicable_licenses: ["packages_apps_Launcher3_license"],
  16. }
  17. min_launcher3_sdk_version = "26"
  18. // Added automatically by a large-scale-change
  19. // See: http://go/android-license-faq
  20. license {
  21. name: "packages_apps_Launcher3_license",
  22. visibility: [":__subpackages__"],
  23. license_kinds: [
  24. "SPDX-license-identifier-Apache-2.0",
  25. ],
  26. license_text: [
  27. "NOTICE",
  28. ],
  29. }
  30. android_library {
  31. name: "launcher-aosp-tapl",
  32. libs: [
  33. "framework-statsd",
  34. ],
  35. static_libs: [
  36. "androidx.annotation_annotation",
  37. "androidx.test.runner",
  38. "androidx.test.rules",
  39. "androidx.test.uiautomator_uiautomator",
  40. "androidx.preference_preference",
  41. "SystemUISharedLib",
  42. ],
  43. srcs: [
  44. "tests/tapl/**/*.java",
  45. "src/com/android/launcher3/ResourceUtils.java",
  46. "src/com/android/launcher3/testing/TestProtocol.java",
  47. ],
  48. resource_dirs: [ ],
  49. manifest: "tests/tapl/AndroidManifest.xml",
  50. platform_apis: true,
  51. }
  52. java_library_static {
  53. name: "launcher_log_protos_lite",
  54. srcs: [
  55. "protos/*.proto",
  56. "protos_overrides/*.proto",
  57. ],
  58. sdk_version: "current",
  59. proto: {
  60. type: "lite",
  61. local_include_dirs:[
  62. "protos",
  63. "protos_overrides",
  64. ],
  65. },
  66. static_libs: ["libprotobuf-java-lite"],
  67. }
  68. java_library_static {
  69. name: "launcher_quickstep_log_protos_lite",
  70. srcs: [
  71. "quickstep/protos_overrides/*.proto",
  72. ],
  73. sdk_version: "current",
  74. proto: {
  75. type: "lite",
  76. local_include_dirs:[
  77. "quickstep/protos_overrides",
  78. ],
  79. },
  80. static_libs: [
  81. "libprotobuf-java-lite",
  82. "launcher_log_protos_lite"
  83. ],
  84. }
  85. java_library {
  86. name: "LauncherPluginLib",
  87. static_libs: ["PluginCoreLib"],
  88. srcs: ["src_plugins/**/*.java"],
  89. sdk_version: "current",
  90. min_sdk_version: min_launcher3_sdk_version,
  91. }
  92. // Library with all the dependencies for building Launcher3
  93. android_library {
  94. name: "Launcher3ResLib",
  95. srcs: [ ],
  96. resource_dirs: ["res"],
  97. static_libs: [
  98. "LauncherPluginLib",
  99. "launcher_quickstep_log_protos_lite",
  100. "androidx-constraintlayout_constraintlayout",
  101. "androidx.recyclerview_recyclerview",
  102. "androidx.dynamicanimation_dynamicanimation",
  103. "androidx.fragment_fragment",
  104. "androidx.preference_preference",
  105. "androidx.slice_slice-view",
  106. "androidx.cardview_cardview",
  107. "com.google.android.material_material",
  108. "iconloader_base",
  109. ],
  110. manifest: "AndroidManifest-common.xml",
  111. sdk_version: "current",
  112. min_sdk_version: min_launcher3_sdk_version,
  113. lint: {
  114. baseline_filename: "lint-baseline-res-lib.xml",
  115. },
  116. }
  117. //
  118. // Build rule for Launcher3 dependencies lib.
  119. //
  120. android_library {
  121. name: "Launcher3CommonDepsLib",
  122. srcs: ["src_build_config/**/*.java"],
  123. static_libs: ["Launcher3ResLib"],
  124. sdk_version: "current",
  125. min_sdk_version: min_launcher3_sdk_version,
  126. manifest: "AndroidManifest-common.xml",
  127. lint: {
  128. baseline_filename: "lint-baseline-common-deps-lib.xml",
  129. },
  130. }
  131. //
  132. // Build rule for Launcher3 app.
  133. //
  134. android_app {
  135. name: "Launcher3",
  136. static_libs: [
  137. "Launcher3CommonDepsLib",
  138. ],
  139. srcs: [
  140. "src/**/*.java",
  141. "src/**/*.kt",
  142. "src_shortcuts_overrides/**/*.java",
  143. "src_shortcuts_overrides/**/*.kt",
  144. "src_ui_overrides/**/*.java",
  145. "src_ui_overrides/**/*.kt",
  146. "ext_tests/src/**/*.java",
  147. "ext_tests/src/**/*.kt",
  148. ],
  149. resource_dirs: [
  150. "ext_tests/res",
  151. ],
  152. optimize: {
  153. proguard_flags_files: ["proguard.flags"],
  154. // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
  155. enabled: false,
  156. },
  157. sdk_version: "current",
  158. min_sdk_version: min_launcher3_sdk_version,
  159. target_sdk_version: "current",
  160. privileged: true,
  161. system_ext_specific: true,
  162. overrides: [
  163. "Home",
  164. "Launcher2",
  165. ],
  166. required: ["privapp_whitelist_com.android.launcher3"],
  167. jacoco: {
  168. include_filter: ["com.android.launcher3.**"],
  169. },
  170. additional_manifests: [
  171. "AndroidManifest-common.xml",
  172. ],
  173. lint: {
  174. baseline_filename: "lint-baseline-launcher3.xml",
  175. },
  176. }
  177. // Library with all the dependencies for building quickstep
  178. android_library {
  179. name: "QuickstepResLib",
  180. srcs: [ ],
  181. resource_dirs: [
  182. "quickstep/res",
  183. ],
  184. libs: [
  185. "framework-statsd",
  186. ],
  187. static_libs: [
  188. "Launcher3ResLib",
  189. "lottie",
  190. "SystemUISharedLib",
  191. "SystemUI-statsd",
  192. ],
  193. manifest: "quickstep/AndroidManifest.xml",
  194. min_sdk_version: "current",
  195. }
  196. // Source code used for test helpers
  197. filegroup {
  198. name: "launcher-src-ext-tests",
  199. srcs: [
  200. "ext_tests/src/**/*.java",
  201. "ext_tests/src/**/*.kt",
  202. ],
  203. }
  204. // Common source files used to build launcher
  205. filegroup {
  206. name: "launcher-src-no-build-config",
  207. srcs: [
  208. "src/**/*.java",
  209. "src/**/*.kt",
  210. "src_shortcuts_overrides/**/*.java",
  211. "src_shortcuts_overrides/**/*.kt",
  212. "quickstep/src/**/*.java",
  213. "quickstep/src/**/*.kt",
  214. ],
  215. }
  216. // Proguard files for Launcher3
  217. filegroup {
  218. name: "launcher-proguard-rules",
  219. srcs: ["proguard.flags"],
  220. }
  221. // Library with all the dependencies for building Launcher Go
  222. android_library {
  223. name: "LauncherGoResLib",
  224. srcs: [
  225. "src/**/*.java",
  226. "src/**/*.kt",
  227. "quickstep/src/**/*.java",
  228. "quickstep/src/**/*.kt",
  229. "go/src/**/*.java",
  230. "go/src/**/*.kt",
  231. "go/quickstep/src/**/*.java",
  232. "go/quickstep/src/**/*.kt",
  233. ],
  234. resource_dirs: [
  235. "go/res",
  236. "go/quickstep/res",
  237. ],
  238. // Note the ordering here is important when it comes to resource
  239. // overriding. We want the most specific resource overrides defined
  240. // in QuickstepResLib to take precendece, so it should be the final
  241. // dependency. See b/205278434 for how this can go wrong.
  242. static_libs: [
  243. "Launcher3CommonDepsLib",
  244. "QuickstepResLib",
  245. ],
  246. manifest: "quickstep/AndroidManifest-launcher.xml",
  247. additional_manifests: [
  248. "go/AndroidManifest.xml",
  249. "AndroidManifest-common.xml",
  250. ],
  251. min_sdk_version: "current",
  252. lint: {
  253. baseline_filename: "lint-baseline-go-res-lib.xml",
  254. },
  255. }
  256. // Build rule for Quickstep library
  257. android_library {
  258. name: "Launcher3QuickStepLib",
  259. srcs: [
  260. ":launcher-src-no-build-config",
  261. ],
  262. resource_dirs: [],
  263. libs: [
  264. "framework-statsd",
  265. ],
  266. // Note the ordering here is important when it comes to resource
  267. // overriding. We want the most specific resource overrides defined
  268. // in QuickstepResLib to take precendece, so it should be the final
  269. // dependency. See b/208647810 for how this can go wrong.
  270. static_libs: [
  271. "SystemUI-statsd",
  272. "SystemUISharedLib",
  273. "Launcher3CommonDepsLib",
  274. "QuickstepResLib",
  275. ],
  276. manifest: "quickstep/AndroidManifest.xml",
  277. platform_apis: true,
  278. min_sdk_version: "current",
  279. lint: {
  280. baseline_filename: "lint-baseline-launcher3.xml",
  281. },
  282. }