Android.bp 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. static_libs: [
  33. "androidx.annotation_annotation",
  34. "androidx.test.runner",
  35. "androidx.test.rules",
  36. "androidx.test.uiautomator_uiautomator",
  37. "androidx.preference_preference",
  38. "SystemUISharedLib",
  39. ],
  40. srcs: [
  41. "tests/tapl/**/*.java",
  42. "src/com/android/launcher3/ResourceUtils.java",
  43. "src/com/android/launcher3/testing/TestProtocol.java",
  44. ],
  45. resource_dirs: [ ],
  46. manifest: "tests/tapl/AndroidManifest.xml",
  47. platform_apis: true,
  48. }
  49. java_library_static {
  50. name: "launcher_log_protos_lite",
  51. srcs: [
  52. "protos/*.proto",
  53. "protos_overrides/*.proto",
  54. ],
  55. sdk_version: "current",
  56. proto: {
  57. type: "lite",
  58. local_include_dirs:[
  59. "protos",
  60. "protos_overrides",
  61. ],
  62. },
  63. static_libs: ["libprotobuf-java-lite"],
  64. }
  65. java_library_static {
  66. name: "launcher_quickstep_log_protos_lite",
  67. srcs: [
  68. "quickstep/protos_overrides/*.proto",
  69. ],
  70. sdk_version: "current",
  71. proto: {
  72. type: "lite",
  73. local_include_dirs:[
  74. "quickstep/protos_overrides",
  75. ],
  76. },
  77. static_libs: [
  78. "libprotobuf-java-lite",
  79. "launcher_log_protos_lite"
  80. ],
  81. }
  82. java_library {
  83. name: "LauncherPluginLib",
  84. static_libs: ["PluginCoreLib"],
  85. srcs: ["src_plugins/**/*.java"],
  86. sdk_version: "current",
  87. min_sdk_version: min_launcher3_sdk_version,
  88. }
  89. // Library with all the dependencies for building Launcher3
  90. android_library {
  91. name: "Launcher3ResLib",
  92. srcs: [ ],
  93. resource_dirs: ["res"],
  94. static_libs: [
  95. "LauncherPluginLib",
  96. "launcher_quickstep_log_protos_lite",
  97. "androidx-constraintlayout_constraintlayout",
  98. "androidx.recyclerview_recyclerview",
  99. "androidx.dynamicanimation_dynamicanimation",
  100. "androidx.fragment_fragment",
  101. "androidx.preference_preference",
  102. "androidx.slice_slice-view",
  103. "androidx.cardview_cardview",
  104. "iconloader_base",
  105. ],
  106. manifest: "AndroidManifest-common.xml",
  107. sdk_version: "current",
  108. min_sdk_version: min_launcher3_sdk_version,
  109. lint: {
  110. baseline_filename: "lint-baseline-res-lib.xml",
  111. },
  112. }
  113. //
  114. // Build rule for Launcher3 dependencies lib.
  115. //
  116. android_library {
  117. name: "Launcher3CommonDepsLib",
  118. srcs: ["src_build_config/**/*.java"],
  119. static_libs: ["Launcher3ResLib"],
  120. sdk_version: "current",
  121. min_sdk_version: min_launcher3_sdk_version,
  122. manifest: "AndroidManifest-common.xml",
  123. lint: {
  124. baseline_filename: "lint-baseline-common-deps-lib.xml",
  125. },
  126. }
  127. //
  128. // Build rule for Launcher3 app.
  129. //
  130. android_app {
  131. name: "Launcher3",
  132. static_libs: [
  133. "Launcher3CommonDepsLib",
  134. ],
  135. srcs: [
  136. "src/**/*.java",
  137. "src_shortcuts_overrides/**/*.java",
  138. "src_ui_overrides/**/*.java",
  139. "ext_tests/src/**/*.java",
  140. ],
  141. resource_dirs: [
  142. "ext_tests/res",
  143. ],
  144. optimize: {
  145. proguard_flags_files: ["proguard.flags"],
  146. // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
  147. enabled: false,
  148. },
  149. sdk_version: "current",
  150. min_sdk_version: min_launcher3_sdk_version,
  151. target_sdk_version: "current",
  152. privileged: true,
  153. system_ext_specific: true,
  154. overrides: [
  155. "Home",
  156. "Launcher2",
  157. ],
  158. required: ["privapp_whitelist_com.android.launcher3"],
  159. jacoco: {
  160. include_filter: ["com.android.launcher3.**"],
  161. },
  162. additional_manifests: [
  163. "AndroidManifest-common.xml",
  164. ],
  165. lint: {
  166. baseline_filename: "lint-baseline-launcher3.xml",
  167. },
  168. }
  169. // Library with all the dependencies for building quickstep
  170. android_library {
  171. name: "QuickstepResLib",
  172. srcs: [ ],
  173. resource_dirs: [
  174. "quickstep/res",
  175. ],
  176. static_libs: [
  177. "Launcher3ResLib",
  178. "SystemUISharedLib",
  179. "SystemUI-statsd",
  180. ],
  181. manifest: "quickstep/AndroidManifest.xml",
  182. min_sdk_version: "current",
  183. }
  184. // Source code used for test helpers
  185. filegroup {
  186. name: "launcher-src-ext-tests",
  187. srcs: ["ext_tests/src/**/*.java"],
  188. }
  189. // Common source files used to build launcher
  190. filegroup {
  191. name: "launcher-src-no-build-config",
  192. srcs: [
  193. "src/**/*.java",
  194. "src_shortcuts_overrides/**/*.java",
  195. "quickstep/src/**/*.java",
  196. ],
  197. }
  198. // Proguard files for Launcher3
  199. filegroup {
  200. name: "launcher-proguard-rules",
  201. srcs: ["proguard.flags"],
  202. }
  203. // Library with all the dependencies for building Launcher Go
  204. android_library {
  205. name: "LauncherGoResLib",
  206. srcs: [
  207. "src/**/*.java",
  208. "quickstep/src/**/*.java",
  209. "go/src/**/*.java",
  210. "go/quickstep/src/**/*.java",
  211. ],
  212. resource_dirs: [
  213. "go/res",
  214. "go/quickstep/res",
  215. ],
  216. static_libs: [
  217. "Launcher3CommonDepsLib",
  218. "QuickstepResLib",
  219. ],
  220. manifest: "quickstep/AndroidManifest-launcher.xml",
  221. additional_manifests: [
  222. "go/AndroidManifest.xml",
  223. "AndroidManifest-common.xml",
  224. ],
  225. min_sdk_version: "current",
  226. lint: {
  227. baseline_filename: "lint-baseline-go-res-lib.xml",
  228. },
  229. }