blob: a8d561e6c80ba35660b54027faeeae9e364a9b92 [file] [log] [blame]
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -08001//
2// Copyright (C) 2021 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17
Bob Badoure9c20682021-03-19 03:30:57 -070018package {
19 default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080022filegroup {
23 name: "ThemePicker_srcs",
24 srcs: [
25 "src/**/*.java",
26 "src/**/*.kt",
Chihhang Chuangd2ece572021-06-17 22:40:26 +080027 // Min requirement for CustomizationInjector and StatsLogUserEventLogger to build without Clock and Theme feature.
28 "src/com/android/customization/model/clock/BaseClockManager.java",
29 "src/com/android/customization/model/clock/Clockface.java",
30 "src/com/android/customization/model/clock/ClockManager.java",
31 "src/com/android/customization/model/clock/ClockProvider.java",
32 "src/com/android/customization/model/theme/OverlayManagerCompat.java",
33 "src/com/android/customization/model/theme/ThemeBundleProvider.java",
34 "src/com/android/customization/model/theme/ThemeManager.java",
35 "src/com/android/customization/model/theme/ThemeBundle.java",
36 "src/com/android/customization/model/theme/custom/CustomTheme.java",
37 ],
38 exclude_srcs: [
39 "src/com/android/customization/model/clock/**/*.java",
40 "src/com/android/customization/model/theme/**/*.java",
41 "src/com/android/customization/picker/clock/**/*.java",
42 "src/com/android/customization/picker/theme/**/*.java",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080043 ],
44}
45
46filegroup {
47 name: "ThemePicker_Manifest",
48 srcs: [
49 "AndroidManifest.xml",
50 ],
51}
52
53genrule {
54 name: "ThemePicker_res",
55 tools: ["soong_zip"],
56 srcs: [
57 "res/**/*"
58 ],
59 out: ["ThemePicker_res.zip"],
60 cmd: "INPUTS=($(in)) && "
61 + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
Colin Cross928f3132021-05-11 18:32:09 +000062 + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080063}
64
65//
66// Build app code.
67//
68android_app {
69 name: "ThemePicker",
70
71 static_libs: [
Kunhung Li53fc4d52022-02-12 16:58:06 +080072 "guava",
73 "monet",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080074 "wallpaper-common-deps",
Chihhang Chuangc21a3ff2021-06-08 12:53:24 +080075 "SettingsLibSettingsTheme",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080076 "SystemUI-statsd",
Chihhang Chuangc21a3ff2021-06-08 12:53:24 +080077 "styleprotoslite",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080078 ],
79
80 srcs: [
81 ":WallpaperPicker2_srcs",
82 ":ThemePicker_srcs",
83 "src_override/**/*.java",
84 "src_override/**/*.kt",
85 ],
86
87 use_embedded_native_libs: true,
88
89 resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res"],
90
91 optimize: {
92 enabled: false,
93 },
Santiago Etchebehere260beaf2021-03-16 18:53:50 -070094 kotlincflags: ["-Xjvm-default=enable"],
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080095 certificate: "",
96
97 privileged: true,
98 system_ext_specific: true,
99 platform_apis: true,
100 manifest: "AndroidManifest.xml",
Chihhang Chuangd2ece572021-06-17 22:40:26 +0800101 additional_manifests: [":WallpaperPicker2_Manifest"],
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -0800102 overrides: ["WallpaperPicker2"],
103}