blob: 3c5ef19533112da6881dd30e767c01d07ae5a2c7 [file] [log] [blame]
Santiago Etchebehereac7512d2021-03-04 18:26:29 -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//
18// Build rule for WallpaperPicker2 dependencies lib.
19//
Bob Badour2021dd72021-03-19 03:57:19 -070020package {
21 default_applicable_licenses: ["Android-Apache-2.0"],
22}
23
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080024android_library {
25 name: "wallpaper-common-deps",
26
27 static_libs: [
28 "androidx.appcompat_appcompat",
29 "androidx.cardview_cardview",
Chihhang Chuang11f5efb2021-06-29 15:15:46 +080030 "androidx-constraintlayout_constraintlayout",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080031 "androidx.exifinterface_exifinterface",
Alejandro Nijamkin58ef3692023-02-06 13:35:48 -080032 "androidx.lifecycle_lifecycle-livedata-ktx",
Santiago Etchebeherec49240a2021-03-16 18:53:22 -070033 "androidx.lifecycle_lifecycle-runtime-ktx",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080034 "androidx.recyclerview_recyclerview",
35 "androidx.slice_slice-view",
Chihhang Chuang11f5efb2021-06-29 15:15:46 +080036 "androidx.viewpager2_viewpager2",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080037 "com.google.android.material_material",
38 "glide-prebuilt",
Biswarup Pal591a1772021-08-25 20:01:32 +000039 "glide-gifdecoder-prebuilt",
40 "glide-disklrucache-prebuilt",
Santiago Etchebeherec49240a2021-03-16 18:53:22 -070041 "kotlinx-coroutines-android",
42 "kotlinx-coroutines-core",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080043 "libbackup",
Kunhung Lid0174362021-04-05 15:31:41 +080044 "SettingsLibCollapsingToolbarBaseActivity",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080045 "subsampling-scale-image-view",
46 "SystemUISharedLib",
Hawkwood Glazier340f4df2022-11-11 18:13:55 +000047 "SystemUICustomizationLib",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080048 "volley",
John Pan0a569512022-03-15 19:50:42 +080049 "SettingsLibActivityEmbedding",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080050 ],
51
52 resource_dirs: ["res"],
53
54 optimize: {
55 enabled: false,
56 },
57
Santiago Etchebeherec49240a2021-03-16 18:53:22 -070058 kotlincflags: ["-Xjvm-default=enable"],
59
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080060 sdk_version: "current",
61
62 manifest: "AndroidManifest-empty.xml",
63
64 visibility: [
65 ":__subpackages__",
Chris Poultneyc267b3e2022-12-20 20:18:06 +000066 "//packages/apps/ThemePicker:__subpackages__",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080067 "//vendor:__subpackages__",
68 ],
69}
70
71filegroup {
72 name: "WallpaperPicker2_srcs",
73 srcs: [
74 "src/**/*.java",
75 "src/**/*.kt",
76 ],
77}
78
Chris Poultney02698d82022-09-20 18:28:35 +000079// If these targets are included in WallpaperPicker2_defaults directly instead of in a filegroup,
80// the tests can't find them.
81filegroup {
82 name: "WallpaperPicker2_src_overrides",
83 srcs: [
84 "src_override/**/*.java",
85 "src_override/**/*.kt",
86 ],
87}
88
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080089genrule {
90 name: "WallpaperPicker2_res",
91 tools: ["soong_zip"],
92 srcs: [
93 "res/**/*"
94 ],
95 out: ["wallpaperpicker2_res.zip"],
96 cmd: "INPUTS=($(in)) && "
97 + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
Colin Crossd593b7b2021-05-11 18:29:39 +000098 + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080099}
100
Chihhang Chuang2813cbd2021-06-17 22:28:56 +0800101filegroup {
102 name: "WallpaperPicker2_Manifest",
103 srcs: [
104 "AndroidManifest.xml",
105 ],
106}
107
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800108java_defaults {
109 name: "WallpaperPicker2_defaults",
110
111 static_libs: [
112 "wallpaper-common-deps",
George Linfc09fe02022-08-23 17:12:23 +0000113 "monet",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800114 ],
115
116 srcs: [
117 ":WallpaperPicker2_srcs",
Chris Poultney02698d82022-09-20 18:28:35 +0000118 ":WallpaperPicker2_src_overrides",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800119 ],
120 resource_zips: [":WallpaperPicker2_res"],
121
122 certificate: "",
123
124 optimize: {
125 enabled: false,
126 },
127
Santiago Etchebeherec49240a2021-03-16 18:53:22 -0700128 kotlincflags: ["-Xjvm-default=enable"],
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800129 privileged: true,
130 system_ext_specific: true,
131
132 use_embedded_native_libs: true,
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800133}
134
135//
136// Build app code.
137//
138android_app {
139 name: "WallpaperPicker2",
140
141 defaults: ["WallpaperPicker2_defaults"],
Chris Poultney02698d82022-09-20 18:28:35 +0000142 manifest: ":WallpaperPicker2_Manifest",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800143
144 platform_apis: true,
145}