Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 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 | |
Bob Badour | 4bdf380 | 2021-02-12 17:08:17 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["packages_apps_Launcher3_license"], |
| 17 | } |
| 18 | |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 19 | min_launcher3_sdk_version = "26" |
| 20 | |
Bob Badour | 4bdf380 | 2021-02-12 17:08:17 -0800 | [diff] [blame] | 21 | // Added automatically by a large-scale-change |
| 22 | // See: http://go/android-license-faq |
| 23 | license { |
| 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 | |
vadimt | 09df083 | 2019-03-07 14:59:30 -0800 | [diff] [blame] | 34 | android_library { |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 35 | name: "launcher-aosp-tapl", |
| 36 | static_libs: [ |
| 37 | "androidx.annotation_annotation", |
Brett Chabot | d7d692c | 2018-10-23 21:17:58 -0700 | [diff] [blame] | 38 | "androidx.test.runner", |
| 39 | "androidx.test.rules", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 40 | "androidx.test.uiautomator_uiautomator", |
Hyunyoung Song | bb71582 | 2020-08-04 10:45:53 -0700 | [diff] [blame] | 41 | "androidx.preference_preference", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 42 | "SystemUISharedLib", |
| 43 | ], |
| 44 | srcs: [ |
| 45 | "tests/tapl/**/*.java", |
vadimt | 1b383af | 2019-05-08 15:29:37 -0700 | [diff] [blame] | 46 | "src/com/android/launcher3/ResourceUtils.java", |
Sunny Goyal | ab3963d | 2019-05-23 00:50:08 -0700 | [diff] [blame] | 47 | "src/com/android/launcher3/testing/TestProtocol.java", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 48 | ], |
Sunny Goyal | 572aca4 | 2021-03-24 15:21:39 -0700 | [diff] [blame] | 49 | resource_dirs: [ ], |
vadimt | 09df083 | 2019-03-07 14:59:30 -0800 | [diff] [blame] | 50 | manifest: "tests/tapl/AndroidManifest.xml", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 51 | platform_apis: true, |
| 52 | } |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 53 | |
| 54 | java_library_static { |
thiruram | c1c2bfa | 2020-02-04 18:56:40 -0800 | [diff] [blame] | 55 | name: "launcher_log_protos_lite", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 56 | srcs: [ |
| 57 | "protos/*.proto", |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 58 | "protos_overrides/*.proto", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 59 | ], |
| 60 | sdk_version: "current", |
| 61 | proto: { |
| 62 | type: "lite", |
| 63 | local_include_dirs:[ |
| 64 | "protos", |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 65 | "protos_overrides", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 66 | ], |
| 67 | }, |
thiruram | c1c2bfa | 2020-02-04 18:56:40 -0800 | [diff] [blame] | 68 | static_libs: ["libprotobuf-java-lite"], |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 69 | } |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 70 | |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 71 | java_library_static { |
| 72 | name: "launcher_quickstep_log_protos_lite", |
| 73 | srcs: [ |
| 74 | "quickstep/protos_overrides/*.proto", |
| 75 | ], |
| 76 | sdk_version: "current", |
| 77 | proto: { |
| 78 | type: "lite", |
| 79 | local_include_dirs:[ |
| 80 | "quickstep/protos_overrides", |
| 81 | ], |
| 82 | }, |
| 83 | static_libs: [ |
| 84 | "libprotobuf-java-lite", |
| 85 | "launcher_log_protos_lite" |
| 86 | ], |
| 87 | } |
| 88 | |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 89 | java_library { |
| 90 | name: "LauncherPluginLib", |
| 91 | |
| 92 | static_libs: ["PluginCoreLib"], |
| 93 | |
| 94 | srcs: ["src_plugins/**/*.java"], |
| 95 | |
| 96 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 97 | min_sdk_version: min_launcher3_sdk_version, |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 98 | } |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 99 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 100 | // Library with all the dependencies for building Launcher3 |
| 101 | android_library { |
| 102 | name: "Launcher3ResLib", |
| 103 | srcs: [ ], |
| 104 | resource_dirs: ["res"], |
| 105 | static_libs: [ |
| 106 | "LauncherPluginLib", |
| 107 | "launcher_quickstep_log_protos_lite", |
| 108 | "androidx-constraintlayout_constraintlayout", |
| 109 | "androidx.recyclerview_recyclerview", |
| 110 | "androidx.dynamicanimation_dynamicanimation", |
| 111 | "androidx.fragment_fragment", |
| 112 | "androidx.preference_preference", |
| 113 | "androidx.slice_slice-view", |
| 114 | "androidx.cardview_cardview", |
Brian Isganitis | 93031bc | 2021-06-09 16:34:45 -0400 | [diff] [blame] | 115 | "com.google.android.material_material", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 116 | "iconloader_base", |
| 117 | ], |
| 118 | manifest: "AndroidManifest-common.xml", |
| 119 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 120 | min_sdk_version: min_launcher3_sdk_version, |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 121 | lint: { |
| 122 | baseline_filename: "lint-baseline-res-lib.xml", |
| 123 | }, |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 124 | } |
| 125 | |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 126 | // |
| 127 | // Build rule for Launcher3 dependencies lib. |
| 128 | // |
| 129 | android_library { |
| 130 | name: "Launcher3CommonDepsLib", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 131 | srcs: ["src_build_config/**/*.java"], |
| 132 | static_libs: ["Launcher3ResLib"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 133 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 134 | min_sdk_version: min_launcher3_sdk_version, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 135 | manifest: "AndroidManifest-common.xml", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 136 | lint: { |
| 137 | baseline_filename: "lint-baseline-common-deps-lib.xml", |
| 138 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | // |
| 142 | // Build rule for Launcher3 app. |
| 143 | // |
| 144 | android_app { |
| 145 | name: "Launcher3", |
| 146 | |
| 147 | static_libs: [ |
| 148 | "Launcher3CommonDepsLib", |
| 149 | ], |
| 150 | srcs: [ |
| 151 | "src/**/*.java", |
| 152 | "src_shortcuts_overrides/**/*.java", |
| 153 | "src_ui_overrides/**/*.java", |
| 154 | "ext_tests/src/**/*.java", |
| 155 | ], |
| 156 | resource_dirs: [ |
| 157 | "ext_tests/res", |
| 158 | ], |
| 159 | optimize: { |
| 160 | proguard_flags_files: ["proguard.flags"], |
| 161 | // Proguard is disable for testing. Derivarive prjects to keep proguard enabled |
| 162 | enabled: false, |
| 163 | }, |
| 164 | |
| 165 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 166 | min_sdk_version: min_launcher3_sdk_version, |
| 167 | target_sdk_version: "current", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 168 | privileged: true, |
| 169 | system_ext_specific: true, |
| 170 | |
| 171 | overrides: [ |
| 172 | "Home", |
| 173 | "Launcher2", |
| 174 | ], |
| 175 | required: ["privapp_whitelist_com.android.launcher3"], |
| 176 | |
| 177 | jacoco: { |
| 178 | include_filter: ["com.android.launcher3.**"], |
| 179 | }, |
| 180 | additional_manifests: [ |
| 181 | "AndroidManifest-common.xml", |
| 182 | ], |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 183 | lint: { |
| 184 | baseline_filename: "lint-baseline-launcher3.xml", |
| 185 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 186 | } |
| 187 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 188 | // Library with all the dependencies for building quickstep |
| 189 | android_library { |
| 190 | name: "QuickstepResLib", |
| 191 | srcs: [ ], |
| 192 | resource_dirs: [ |
| 193 | "quickstep/res", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 194 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 195 | static_libs: [ |
| 196 | "Launcher3ResLib", |
| 197 | "SystemUISharedLib", |
| 198 | "SystemUI-statsd", |
| 199 | ], |
| 200 | manifest: "quickstep/AndroidManifest.xml", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 201 | min_sdk_version: "current", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | |
| 205 | // Source code used for test helpers |
| 206 | filegroup { |
| 207 | name: "launcher-src-ext-tests", |
| 208 | srcs: ["ext_tests/src/**/*.java"], |
| 209 | } |
| 210 | |
| 211 | // Common source files used to build launcher |
| 212 | filegroup { |
| 213 | name: "launcher-src-no-build-config", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 214 | srcs: [ |
| 215 | "src/**/*.java", |
| 216 | "src_shortcuts_overrides/**/*.java", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 217 | "quickstep/src/**/*.java", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 218 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | // Proguard files for Launcher3 |
| 222 | filegroup { |
| 223 | name: "launcher-proguard-rules", |
| 224 | srcs: ["proguard.flags"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 225 | } |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 226 | |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 227 | // Library with all the dependencies for building Launcher Go |
| 228 | android_library { |
| 229 | name: "LauncherGoResLib", |
| 230 | srcs: [ |
| 231 | "src/**/*.java", |
| 232 | "quickstep/src/**/*.java", |
| 233 | "go/src/**/*.java", |
| 234 | "go/quickstep/src/**/*.java", |
| 235 | ], |
| 236 | resource_dirs: [ |
| 237 | "go/res", |
| 238 | "go/quickstep/res", |
| 239 | ], |
| 240 | static_libs: [ |
| 241 | "Launcher3CommonDepsLib", |
| 242 | "QuickstepResLib", |
| 243 | ], |
| 244 | manifest: "quickstep/AndroidManifest-launcher.xml", |
| 245 | additional_manifests: [ |
| 246 | "go/AndroidManifest.xml", |
| 247 | "AndroidManifest-common.xml", |
| 248 | ], |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 249 | min_sdk_version: "current", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 250 | lint: { |
| 251 | baseline_filename: "lint-baseline-go-res-lib.xml", |
| 252 | }, |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 253 | } |
| 254 | |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame^] | 255 | // Build rule for Quickstep library |
| 256 | android_library { |
| 257 | name: "Launcher3QuickStepLib", |
| 258 | srcs: [ |
| 259 | ":launcher-src-no-build-config", |
| 260 | ], |
| 261 | resource_dirs: [ |
| 262 | "quickstep/res", |
| 263 | ], |
| 264 | static_libs: [ |
| 265 | "SystemUI-statsd", |
| 266 | "SystemUISharedLib", |
| 267 | "Launcher3CommonDepsLib" |
| 268 | ], |
| 269 | manifest: "quickstep/AndroidManifest.xml", |
| 270 | platform_apis: true, |
| 271 | min_sdk_version: "current", |
| 272 | lint: { |
| 273 | baseline_filename: "lint-baseline-launcher3.xml", |
| 274 | }, |
| 275 | } |