Android.bp 8.2 KB

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