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