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