Android.bp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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. // Common source files used to build launcher (java and kotlin)
  20. // All sources are split so they can be reused in many other libraries/apps in other folders
  21. filegroup {
  22. name: "launcher-src",
  23. srcs: [ "src/**/*.java", "src/**/*.kt" ],
  24. }
  25. filegroup {
  26. name: "launcher-quickstep-src",
  27. srcs: [ "quickstep/src/**/*.java", "quickstep/src/**/*.kt" ],
  28. }
  29. filegroup {
  30. name: "launcher-go-src",
  31. srcs: [ "go/src/**/*.java", "go/src/**/*.kt" ],
  32. }
  33. filegroup {
  34. name: "launcher-go-quickstep-src",
  35. srcs: [ "go/quickstep/src/**/*.java", "go/quickstep/src/**/*.kt" ],
  36. }
  37. filegroup {
  38. name: "launcher-src_shortcuts_overrides",
  39. srcs: [ "src_shortcuts_overrides/**/*.java", "src_shortcuts_overrides/**/*.kt" ],
  40. }
  41. filegroup {
  42. name: "launcher-src_ui_overrides",
  43. srcs: [ "src_ui_overrides/**/*.java", "src_ui_overrides/**/*.kt" ],
  44. }
  45. filegroup {
  46. name: "launcher-ext_tests",
  47. srcs: [ "ext_tests/**/*.java", "ext_tests/**/*.kt" ],
  48. }
  49. filegroup {
  50. name: "launcher-quickstep-ext_tests",
  51. srcs: [ "quickstep/ext_tests/**/*.java", "quickstep/ext_tests/**/*.kt" ],
  52. }
  53. // Proguard files for Launcher3
  54. filegroup {
  55. name: "launcher-proguard-rules",
  56. srcs: ["proguard.flags"],
  57. }
  58. android_library {
  59. name: "launcher-aosp-tapl",
  60. libs: [
  61. "framework-statsd",
  62. ],
  63. static_libs: [
  64. "androidx.annotation_annotation",
  65. "androidx.test.runner",
  66. "androidx.test.rules",
  67. "androidx.test.uiautomator_uiautomator",
  68. "androidx.preference_preference",
  69. "SystemUISharedLib",
  70. "SystemUIAnimationLib",
  71. "launcher-testing-shared",
  72. ],
  73. srcs: [
  74. "tests/tapl/**/*.java",
  75. ],
  76. resource_dirs: [ ],
  77. manifest: "tests/tapl/AndroidManifest.xml",
  78. platform_apis: true,
  79. }
  80. java_library_static {
  81. name: "launcher_log_protos_lite",
  82. srcs: [
  83. "protos/*.proto",
  84. "protos_overrides/*.proto",
  85. ],
  86. sdk_version: "current",
  87. proto: {
  88. type: "lite",
  89. local_include_dirs:[
  90. "protos",
  91. "protos_overrides",
  92. ],
  93. },
  94. static_libs: ["libprotobuf-java-lite"],
  95. }
  96. java_library_static {
  97. name: "launcher_quickstep_log_protos_lite",
  98. srcs: [
  99. "quickstep/protos_overrides/*.proto",
  100. ],
  101. sdk_version: "current",
  102. proto: {
  103. type: "lite",
  104. local_include_dirs:[
  105. "quickstep/protos_overrides",
  106. ],
  107. },
  108. static_libs: [
  109. "libprotobuf-java-lite",
  110. "launcher_log_protos_lite"
  111. ],
  112. }
  113. java_library {
  114. name: "LauncherPluginLib",
  115. static_libs: ["PluginCoreLib"],
  116. srcs: ["src_plugins/**/*.java"],
  117. sdk_version: "current",
  118. min_sdk_version: min_launcher3_sdk_version,
  119. }
  120. // Library with all the dependencies for building Launcher3
  121. android_library {
  122. name: "Launcher3ResLib",
  123. srcs: [ ],
  124. resource_dirs: ["res"],
  125. static_libs: [
  126. "LauncherPluginLib",
  127. "launcher_quickstep_log_protos_lite",
  128. "androidx-constraintlayout_constraintlayout",
  129. "androidx.recyclerview_recyclerview",
  130. "androidx.dynamicanimation_dynamicanimation",
  131. "androidx.fragment_fragment",
  132. "androidx.preference_preference",
  133. "androidx.slice_slice-view",
  134. "androidx.cardview_cardview",
  135. "com.google.android.material_material",
  136. "iconloader_base",
  137. "view_capture"
  138. ],
  139. manifest: "AndroidManifest-common.xml",
  140. sdk_version: "current",
  141. min_sdk_version: min_launcher3_sdk_version,
  142. lint: {
  143. baseline_filename: "lint-baseline-res-lib.xml",
  144. },
  145. }
  146. //
  147. // Build rule for Launcher3 dependencies lib.
  148. //
  149. android_library {
  150. name: "Launcher3CommonDepsLib",
  151. srcs: ["src_build_config/**/*.java"],
  152. static_libs: [
  153. "Launcher3ResLib",
  154. "launcher-testing-shared",
  155. ],
  156. sdk_version: "current",
  157. min_sdk_version: min_launcher3_sdk_version,
  158. manifest: "AndroidManifest-common.xml",
  159. lint: {
  160. baseline_filename: "lint-baseline-common-deps-lib.xml",
  161. },
  162. }
  163. //
  164. // Build rule for Launcher3 app.
  165. //
  166. android_app {
  167. name: "Launcher3",
  168. static_libs: [
  169. "Launcher3CommonDepsLib",
  170. ],
  171. srcs: [
  172. ":launcher-src",
  173. ":launcher-src_shortcuts_overrides",
  174. ":launcher-src_ui_overrides",
  175. ":launcher-ext_tests",
  176. ],
  177. resource_dirs: [
  178. "ext_tests/res",
  179. ],
  180. optimize: {
  181. proguard_flags_files: ["proguard.flags"],
  182. // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
  183. enabled: false,
  184. },
  185. sdk_version: "current",
  186. min_sdk_version: min_launcher3_sdk_version,
  187. target_sdk_version: "current",
  188. privileged: true,
  189. system_ext_specific: true,
  190. overrides: [
  191. "Home",
  192. "Launcher2",
  193. ],
  194. required: ["privapp_whitelist_com.android.launcher3"],
  195. jacoco: {
  196. include_filter: ["com.android.launcher3.**"],
  197. },
  198. additional_manifests: [
  199. "AndroidManifest-common.xml",
  200. ],
  201. lint: {
  202. baseline_filename: "lint-baseline-launcher3.xml",
  203. },
  204. }
  205. // Library with all the dependencies for building quickstep
  206. android_library {
  207. name: "QuickstepResLib",
  208. srcs: [ ],
  209. resource_dirs: [
  210. "quickstep/res",
  211. ],
  212. libs: [
  213. "framework-statsd",
  214. ],
  215. static_libs: [
  216. "Launcher3ResLib",
  217. "lottie",
  218. "SystemUISharedLib",
  219. "SystemUI-statsd",
  220. "SystemUIAnimationLib",
  221. ],
  222. manifest: "quickstep/AndroidManifest.xml",
  223. min_sdk_version: "current",
  224. }
  225. // Library with all the dependencies for building Launcher Go
  226. android_library {
  227. name: "LauncherGoResLib",
  228. srcs: [
  229. ":launcher-src",
  230. ":launcher-quickstep-src",
  231. ":launcher-go-src",
  232. ":launcher-go-quickstep-src",
  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. "androidx.room_room-runtime",
  246. ],
  247. plugins: ["androidx.room_room-compiler-plugin"],
  248. manifest: "quickstep/AndroidManifest-launcher.xml",
  249. additional_manifests: [
  250. "go/AndroidManifest.xml",
  251. "AndroidManifest-common.xml",
  252. ],
  253. min_sdk_version: "current",
  254. lint: {
  255. baseline_filename: "lint-baseline-go-res-lib.xml",
  256. },
  257. }
  258. // Build rule for Quickstep library
  259. android_library {
  260. name: "Launcher3QuickStepLib",
  261. srcs: [
  262. ":launcher-src",
  263. ":launcher-quickstep-src",
  264. ":launcher-src_shortcuts_overrides",
  265. ],
  266. resource_dirs: [],
  267. libs: [
  268. "framework-statsd",
  269. ],
  270. // Note the ordering here is important when it comes to resource
  271. // overriding. We want the most specific resource overrides defined
  272. // in QuickstepResLib to take precendece, so it should be the final
  273. // dependency. See b/208647810 for how this can go wrong.
  274. static_libs: [
  275. "SystemUI-statsd",
  276. "SystemUISharedLib",
  277. "Launcher3CommonDepsLib",
  278. "QuickstepResLib",
  279. "SystemUIAnimationLib",
  280. ],
  281. manifest: "quickstep/AndroidManifest.xml",
  282. platform_apis: true,
  283. min_sdk_version: "current",
  284. lint: {
  285. baseline_filename: "lint-baseline-launcher3.xml",
  286. },
  287. }
  288. // Build rule for Launcher3 Go app for Android Go devices.
  289. android_app {
  290. name: "Launcher3Go",
  291. static_libs: ["Launcher3CommonDepsLib"],
  292. srcs: [
  293. ":launcher-src",
  294. ":launcher-go-src",
  295. ":launcher-src_ui_overrides",
  296. ],
  297. resource_dirs: ["go/res"],
  298. optimize: {
  299. proguard_flags_files: ["proguard.flags"],
  300. },
  301. sdk_version: "current",
  302. min_sdk_version: "current",
  303. target_sdk_version: "current",
  304. privileged: true,
  305. system_ext_specific: true,
  306. overrides: [
  307. "Home",
  308. "Launcher2",
  309. "Launcher3",
  310. "Launcher3QuickStep",
  311. ],
  312. required: ["privapp_whitelist_com.android.launcher3"],
  313. additional_manifests: [
  314. "AndroidManifest.xml",
  315. "AndroidManifest-common.xml",
  316. ],
  317. manifest: "go/AndroidManifest.xml",
  318. jacoco: {
  319. include_filter: ["com.android.launcher3.*"],
  320. }
  321. }
  322. // Build rule for Quickstep app.
  323. android_app {
  324. name: "Launcher3QuickStep",
  325. static_libs: ["Launcher3QuickStepLib"],
  326. optimize: {
  327. enabled: false,
  328. },
  329. platform_apis: true,
  330. min_sdk_version: "current",
  331. target_sdk_version: "current",
  332. privileged: true,
  333. system_ext_specific: true,
  334. overrides: [
  335. "Home",
  336. "Launcher2",
  337. "Launcher3",
  338. ],
  339. required: ["privapp_whitelist_com.android.launcher3"],
  340. resource_dirs: ["quickstep/res"],
  341. additional_manifests: [
  342. "quickstep/AndroidManifest-launcher.xml",
  343. "AndroidManifest-common.xml",
  344. ],
  345. manifest: "quickstep/AndroidManifest.xml",
  346. jacoco: {
  347. include_filter: ["com.android.launcher3.*"],
  348. }
  349. }
  350. // Build rule for Launcher3 Go app with quickstep for Android Go devices.
  351. android_app {
  352. name: "Launcher3QuickStepGo",
  353. static_libs: [
  354. "SystemUI-statsd",
  355. "SystemUISharedLib",
  356. "LauncherGoResLib",
  357. ],
  358. platform_apis: true,
  359. min_sdk_version: "current",
  360. target_sdk_version: "current",
  361. srcs: [ ],
  362. resource_dirs: [
  363. "go/quickstep/res",
  364. "go/res",
  365. "quickstep/res",
  366. ],
  367. optimize: {
  368. proguard_flags_files: ["proguard.flags"],
  369. enabled: true,
  370. },
  371. privileged: true,
  372. system_ext_specific: true,
  373. overrides: [
  374. "Home",
  375. "Launcher2",
  376. "Launcher3",
  377. "Launcher3QuickStep",
  378. ],
  379. required: ["privapp_whitelist_com.android.launcher3"],
  380. additional_manifests: [
  381. "go/AndroidManifest.xml",
  382. "go/AndroidManifest-launcher.xml",
  383. "AndroidManifest-common.xml",
  384. ],
  385. manifest: "quickstep/AndroidManifest.xml",
  386. jacoco: {
  387. include_filter: ["com.android.launcher3.*"],
  388. }
  389. }