blob: 28749ea3a051ab4c51d931a814c8af8381d785bc [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: [
72 "wallpaper-common-deps",
Chihhang Chuangc21a3ff2021-06-08 12:53:24 +080073 "SettingsLibSettingsTheme",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080074 "SystemUI-statsd",
Chihhang Chuangc21a3ff2021-06-08 12:53:24 +080075 "styleprotoslite",
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080076 ],
77
78 srcs: [
79 ":WallpaperPicker2_srcs",
80 ":ThemePicker_srcs",
81 "src_override/**/*.java",
82 "src_override/**/*.kt",
83 ],
84
85 use_embedded_native_libs: true,
86
87 resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res"],
88
89 optimize: {
90 enabled: false,
91 },
Santiago Etchebehere260beaf2021-03-16 18:53:50 -070092 kotlincflags: ["-Xjvm-default=enable"],
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -080093 certificate: "",
94
95 privileged: true,
96 system_ext_specific: true,
97 platform_apis: true,
98 manifest: "AndroidManifest.xml",
Chihhang Chuangd2ece572021-06-17 22:40:26 +080099 additional_manifests: [":WallpaperPicker2_Manifest"],
Michael W9d386542022-04-06 21:57:11 +0200100 overrides: [
101 "WallpaperCropper",
102 "WallpaperPicker2",
103 ],
LuK13373f770072020-09-15 03:27:19 +0200104 required: [
105 "default_permissions_com.android.wallpaper",
106 "privapp_whitelist_com.android.wallpaper"
107 ],
108}
109
110prebuilt_etc {
111 name: "default_permissions_com.android.wallpaper",
112 system_ext_specific: true,
113 src: "default_permissions_com.android.wallpaper.xml",
114 sub_dir: "default-permissions",
115 filename_from_src: true,
Luca Stefani28175ec2019-11-01 21:14:29 +0100116}
117
118prebuilt_etc {
119 name: "privapp_whitelist_com.android.wallpaper",
120 system_ext_specific: true,
121 src: "privapp_whitelist_com.android.wallpaper.xml",
122 sub_dir: "permissions",
123 filename_from_src: true,
Santiago Etchebehere0b1d66e2021-03-04 18:25:05 -0800124}