blob: dbffb77279ccbcf4aa8f496485c706ef0a354015 [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",
Santiago Etchebeherec49240a2021-03-16 18:53:22 -070032 "androidx.lifecycle_lifecycle-runtime-ktx",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080033 "androidx.recyclerview_recyclerview",
34 "androidx.slice_slice-view",
Chihhang Chuang11f5efb2021-06-29 15:15:46 +080035 "androidx.viewpager2_viewpager2",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080036 "com.google.android.material_material",
37 "glide-prebuilt",
Biswarup Pal591a1772021-08-25 20:01:32 +000038 "glide-gifdecoder-prebuilt",
39 "glide-disklrucache-prebuilt",
Santiago Etchebeherec49240a2021-03-16 18:53:22 -070040 "kotlinx-coroutines-android",
41 "kotlinx-coroutines-core",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080042 "libbackup",
Kunhung Lid0174362021-04-05 15:31:41 +080043 "SettingsLibCollapsingToolbarBaseActivity",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080044 "subsampling-scale-image-view",
45 "SystemUISharedLib",
46 "volley",
John Pan0a569512022-03-15 19:50:42 +080047 "SettingsLibActivityEmbedding",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080048 ],
49
50 resource_dirs: ["res"],
51
52 optimize: {
53 enabled: false,
54 },
55
Santiago Etchebeherec49240a2021-03-16 18:53:22 -070056 kotlincflags: ["-Xjvm-default=enable"],
57
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080058 sdk_version: "current",
59
60 manifest: "AndroidManifest-empty.xml",
61
62 visibility: [
63 ":__subpackages__",
64 "//packages/apps/ThemePicker",
65 "//vendor:__subpackages__",
66 ],
67}
68
69filegroup {
70 name: "WallpaperPicker2_srcs",
71 srcs: [
72 "src/**/*.java",
73 "src/**/*.kt",
74 ],
75}
76
Chris Poultney02698d82022-09-20 18:28:35 +000077// If these targets are included in WallpaperPicker2_defaults directly instead of in a filegroup,
78// the tests can't find them.
79filegroup {
80 name: "WallpaperPicker2_src_overrides",
81 srcs: [
82 "src_override/**/*.java",
83 "src_override/**/*.kt",
84 ],
85}
86
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080087genrule {
88 name: "WallpaperPicker2_res",
89 tools: ["soong_zip"],
90 srcs: [
91 "res/**/*"
92 ],
93 out: ["wallpaperpicker2_res.zip"],
94 cmd: "INPUTS=($(in)) && "
95 + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
Colin Crossd593b7b2021-05-11 18:29:39 +000096 + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR"
Santiago Etchebehereac7512d2021-03-04 18:26:29 -080097}
98
Chihhang Chuang2813cbd2021-06-17 22:28:56 +080099filegroup {
100 name: "WallpaperPicker2_Manifest",
101 srcs: [
102 "AndroidManifest.xml",
103 ],
104}
105
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800106java_defaults {
107 name: "WallpaperPicker2_defaults",
108
109 static_libs: [
Ching-Sung Li3943d362022-03-29 18:54:11 +0800110 "renderscript_toolkit",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800111 "wallpaper-common-deps",
112 ],
113
Ching-Sung Li3943d362022-03-29 18:54:11 +0800114 jni_libs: [
115 "librenderscript-toolkit",
116 ],
117
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800118 srcs: [
119 ":WallpaperPicker2_srcs",
Chris Poultney02698d82022-09-20 18:28:35 +0000120 ":WallpaperPicker2_src_overrides",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800121 ],
122 resource_zips: [":WallpaperPicker2_res"],
123
124 certificate: "",
125
126 optimize: {
127 enabled: false,
128 },
129
Santiago Etchebeherec49240a2021-03-16 18:53:22 -0700130 kotlincflags: ["-Xjvm-default=enable"],
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800131 privileged: true,
132 system_ext_specific: true,
133
134 use_embedded_native_libs: true,
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800135}
136
137//
138// Build app code.
139//
140android_app {
141 name: "WallpaperPicker2",
142
143 defaults: ["WallpaperPicker2_defaults"],
Chris Poultney02698d82022-09-20 18:28:35 +0000144 manifest: ":WallpaperPicker2_Manifest",
Santiago Etchebehereac7512d2021-03-04 18:26:29 -0800145
146 platform_apis: true,
147}