blob: 9c9c222a1794b820e59c4d03817114a89014061f [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",
27 ],
28}
29
30filegroup {
Chris Poultneyf5109062022-12-20 19:57:42 +000031 name: "ThemePicker_src_overrides",
32 srcs: [
33 "src_override/**/*.java",
34 "src_override/**/*.kt",
35 ],
36}
37
38filegroup {
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080039 name: "ThemePicker_Manifest",
40 srcs: [
41 "AndroidManifest.xml",
42 ],
43}
44
45genrule {
46 name: "ThemePicker_res",
47 tools: ["soong_zip"],
48 srcs: [
George Lin621fb8f2022-07-29 21:13:41 +000049 "res/**/*",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080050 ],
51 out: ["ThemePicker_res.zip"],
52 cmd: "INPUTS=($(in)) && "
53 + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
Colin Cross928f3132021-05-11 18:32:09 +000054 + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080055}
56
Chris Poultneyf5109062022-12-20 19:57:42 +000057genrule {
58 name: "ThemePicker_res_overrides",
59 tools: ["soong_zip"],
60 srcs: [
61 "res_override/**/*",
62 ],
63 out: ["ThemePicker_res_overrides.zip"],
64 cmd: "INPUTS=($(in)) && "
65 + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
66 + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
67}
68
69java_defaults {
70 name: "ThemePicker_defaults",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080071
72 static_libs: [
Kunhung Li53fc4d52022-02-12 16:58:06 +080073 "guava",
74 "monet",
Alejandro Nijamkin0f02b082022-11-24 13:43:43 -080075 "renderscript_toolkit",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080076 "wallpaper-common-deps",
Chihhang Chuangc21a3ff2021-06-08 12:53:24 +080077 "SettingsLibSettingsTheme",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080078 "SystemUI-statsd",
Chihhang Chuangc21a3ff2021-06-08 12:53:24 +080079 "styleprotoslite",
Alejandro Nijamkin7a062282023-02-06 13:38:40 -080080 "androidx.lifecycle_lifecycle-livedata-ktx",
Alejandro Nijamkin0f02b082022-11-24 13:43:43 -080081 "androidx.lifecycle_lifecycle-runtime-ktx",
82 "androidx.lifecycle_lifecycle-viewmodel-ktx",
83 "androidx.recyclerview_recyclerview",
84 "SystemUICustomizationLib",
Austin Wang54ab36b2023-06-15 17:29:00 -070085 "hilt_android",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080086 ],
87
Ching-Sung Libdf34222022-03-30 15:19:13 +080088 jni_libs: [
89 "librenderscript-toolkit",
90 ],
91
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080092 srcs: [
93 ":WallpaperPicker2_srcs",
94 ":ThemePicker_srcs",
Chris Poultneyf5109062022-12-20 19:57:42 +000095 ":ThemePicker_src_overrides",
George Lin621fb8f2022-07-29 21:13:41 +000096 ],
97
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080098 use_embedded_native_libs: true,
99
Chris Poultneyf5109062022-12-20 19:57:42 +0000100 resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"],
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -0800101
102 optimize: {
103 enabled: false,
104 },
Santiago Etchebehere260beaf2021-03-16 18:53:50 -0700105 kotlincflags: ["-Xjvm-default=enable"],
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -0800106 certificate: "",
107
108 privileged: true,
109 system_ext_specific: true,
Chris Poultneyf5109062022-12-20 19:57:42 +0000110}
111
112//
113// Build app code.
114//
115android_app {
116 name: "ThemePicker",
117 defaults: ["ThemePicker_defaults"],
118
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -0800119 platform_apis: true,
120 manifest: "AndroidManifest.xml",
Chihhang Chuangd2ece572021-06-17 22:40:26 +0800121 additional_manifests: [":WallpaperPicker2_Manifest"],
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -0800122 overrides: ["WallpaperPicker2"],
123}