• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
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
18package {
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22filegroup {
23    name: "ThemePicker_srcs",
24    srcs: [
25        "src/**/*.java",
26        "src/**/*.kt",
27    ],
28}
29
30filegroup {
31    name: "ThemePicker_src_overrides",
32    srcs: [
33        "src_override/**/*.java",
34        "src_override/**/*.kt",
35    ],
36}
37
38filegroup {
39    name: "ThemePicker_Manifest",
40    srcs: [
41        "AndroidManifest.xml",
42    ],
43}
44
45genrule {
46    name: "ThemePicker_res",
47    tools: ["soong_zip"],
48    srcs: [
49        "res/**/*",
50    ],
51    out: ["ThemePicker_res.zip"],
52    cmd: "INPUTS=($(in)) && "
53        + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
54        + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
55}
56
57genrule {
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",
71
72    static_libs: [
73        "guava",
74        "monet",
75	    "renderscript_toolkit",
76        "wallpaper-common-deps",
77        "SettingsLibSettingsTheme",
78        "SystemUI-statsd",
79        "styleprotoslite",
80        "androidx.lifecycle_lifecycle-livedata-ktx",
81        "androidx.lifecycle_lifecycle-runtime-ktx",
82        "androidx.lifecycle_lifecycle-viewmodel-ktx",
83        "androidx.recyclerview_recyclerview",
84        "SystemUICustomizationLib",
85    ],
86
87    jni_libs: [
88        "librenderscript-toolkit",
89    ],
90
91    srcs: [
92        ":WallpaperPicker2_srcs",
93        ":ThemePicker_srcs",
94        ":ThemePicker_src_overrides",
95    ],
96
97    use_embedded_native_libs: true,
98
99    resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"],
100
101    optimize: {
102        enabled: false,
103    },
104    kotlincflags: ["-Xjvm-default=enable"],
105    certificate: "",
106
107    privileged: true,
108    system_ext_specific: true,
109}
110
111//
112// Build app code.
113//
114android_app {
115    name: "ThemePicker",
116    defaults: ["ThemePicker_defaults"],
117
118    platform_apis: true,
119    manifest: "AndroidManifest.xml",
120    additional_manifests: [":WallpaperPicker2_Manifest"],
121    overrides: ["WallpaperPicker2"],
122}
123