blob: f78ec56f4d1366f6a81aaaba3925f94431e05484 [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//
20android_library {
21 name: "wallpaper-common-deps",
22
23 static_libs: [
24 "androidx.appcompat_appcompat",
25 "androidx.cardview_cardview",
26 "androidx.exifinterface_exifinterface",
27 "androidx.recyclerview_recyclerview",
28 "androidx.slice_slice-view",
29 "androidx-constraintlayout_constraintlayout",
30 "com.google.android.material_material",
31 "glide-prebuilt",
32 "libbackup",
33 "subsampling-scale-image-view",
34 "SystemUISharedLib",
35 "volley",
36 ],
37
38 resource_dirs: ["res"],
39
40 optimize: {
41 enabled: false,
42 },
43
44 sdk_version: "current",
45
46 manifest: "AndroidManifest-empty.xml",
47
48 visibility: [
49 ":__subpackages__",
50 "//packages/apps/ThemePicker",
51 "//vendor:__subpackages__",
52 ],
53}
54
55filegroup {
56 name: "WallpaperPicker2_srcs",
57 srcs: [
58 "src/**/*.java",
59 "src/**/*.kt",
60 ],
61}
62
63genrule {
64 name: "WallpaperPicker2_res",
65 tools: ["soong_zip"],
66 srcs: [
67 "res/**/*"
68 ],
69 out: ["wallpaperpicker2_res.zip"],
70 cmd: "INPUTS=($(in)) && "
71 + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && "
72 + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR && "
73 + "cp $(out) ."
74}
75
76java_defaults {
77 name: "WallpaperPicker2_defaults",
78
79 static_libs: [
80 "wallpaper-common-deps",
81 ],
82
83 srcs: [
84 ":WallpaperPicker2_srcs",
85 "src_override/**/*.java",
86 "src_override/**/*.kt",
87 ],
88 resource_zips: [":WallpaperPicker2_res"],
89
90 certificate: "",
91
92 optimize: {
93 enabled: false,
94 },
95
96 privileged: true,
97 system_ext_specific: true,
98
99 use_embedded_native_libs: true,
100
101 manifest: "AndroidManifest.xml",
102}
103
104//
105// Build app code.
106//
107android_app {
108 name: "WallpaperPicker2",
109
110 defaults: ["WallpaperPicker2_defaults"],
111
112 platform_apis: true,
113}