Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 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 | |
Bob Badour | e9c2068 | 2021-03-19 03:30:57 -0700 | [diff] [blame] | 18 | package { |
| 19 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 20 | } |
| 21 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 22 | filegroup { |
| 23 | name: "ThemePicker_srcs", |
| 24 | srcs: [ |
| 25 | "src/**/*.java", |
| 26 | "src/**/*.kt", |
| 27 | ], |
| 28 | } |
| 29 | |
| 30 | filegroup { |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 31 | name: "ThemePicker_src_overrides", |
| 32 | srcs: [ |
| 33 | "src_override/**/*.java", |
| 34 | "src_override/**/*.kt", |
| 35 | ], |
| 36 | } |
| 37 | |
| 38 | filegroup { |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 39 | name: "ThemePicker_Manifest", |
| 40 | srcs: [ |
| 41 | "AndroidManifest.xml", |
| 42 | ], |
| 43 | } |
| 44 | |
| 45 | genrule { |
| 46 | name: "ThemePicker_res", |
| 47 | tools: ["soong_zip"], |
| 48 | srcs: [ |
George Lin | 621fb8f | 2022-07-29 21:13:41 +0000 | [diff] [blame] | 49 | "res/**/*", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 50 | ], |
| 51 | out: ["ThemePicker_res.zip"], |
| 52 | cmd: "INPUTS=($(in)) && " |
| 53 | + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && " |
Colin Cross | 928f313 | 2021-05-11 18:32:09 +0000 | [diff] [blame] | 54 | + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR" |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 55 | } |
| 56 | |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 57 | genrule { |
| 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 | |
Alexander Martinz | 0eba31f | 2023-03-27 09:21:32 +0200 | [diff] [blame] | 69 | genrule { |
| 70 | name: "ThemePicker_res_overrides_gms", |
| 71 | tools: ["soong_zip"], |
| 72 | srcs: [ |
| 73 | "res_override_gms/**/*", |
| 74 | ], |
| 75 | out: ["ThemePicker_res_overrides_gms.zip"], |
| 76 | cmd: "INPUTS=($(in)) && " |
| 77 | + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && " |
| 78 | + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR" |
| 79 | } |
| 80 | |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 81 | java_defaults { |
| 82 | name: "ThemePicker_defaults", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 83 | |
| 84 | static_libs: [ |
Kunhung Li | 53fc4d5 | 2022-02-12 16:58:06 +0800 | [diff] [blame] | 85 | "guava", |
| 86 | "monet", |
Alejandro Nijamkin | 0f02b08 | 2022-11-24 13:43:43 -0800 | [diff] [blame] | 87 | "renderscript_toolkit", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 88 | "wallpaper-common-deps", |
Chihhang Chuang | c21a3ff | 2021-06-08 12:53:24 +0800 | [diff] [blame] | 89 | "SettingsLibSettingsTheme", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 90 | "SystemUI-statsd", |
Chihhang Chuang | c21a3ff | 2021-06-08 12:53:24 +0800 | [diff] [blame] | 91 | "styleprotoslite", |
Alejandro Nijamkin | 7a06228 | 2023-02-06 13:38:40 -0800 | [diff] [blame] | 92 | "androidx.lifecycle_lifecycle-livedata-ktx", |
Alejandro Nijamkin | 0f02b08 | 2022-11-24 13:43:43 -0800 | [diff] [blame] | 93 | "androidx.lifecycle_lifecycle-runtime-ktx", |
| 94 | "androidx.lifecycle_lifecycle-viewmodel-ktx", |
| 95 | "androidx.recyclerview_recyclerview", |
| 96 | "SystemUICustomizationLib", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 97 | ], |
| 98 | |
Ching-Sung Li | bdf3422 | 2022-03-30 15:19:13 +0800 | [diff] [blame] | 99 | jni_libs: [ |
| 100 | "librenderscript-toolkit", |
| 101 | ], |
| 102 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 103 | srcs: [ |
| 104 | ":WallpaperPicker2_srcs", |
| 105 | ":ThemePicker_srcs", |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 106 | ":ThemePicker_src_overrides", |
George Lin | 621fb8f | 2022-07-29 21:13:41 +0000 | [diff] [blame] | 107 | ], |
| 108 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 109 | use_embedded_native_libs: true, |
| 110 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 111 | optimize: { |
| 112 | enabled: false, |
| 113 | }, |
Santiago Etchebehere | 260beaf | 2021-03-16 18:53:50 -0700 | [diff] [blame] | 114 | kotlincflags: ["-Xjvm-default=enable"], |
Tommy Webb | 3c2259a | 2023-06-20 12:58:20 -0400 | [diff] [blame] | 115 | certificate: "", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 116 | |
| 117 | privileged: true, |
| 118 | system_ext_specific: true, |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | // |
| 122 | // Build app code. |
| 123 | // |
| 124 | android_app { |
| 125 | name: "ThemePicker", |
| 126 | defaults: ["ThemePicker_defaults"], |
| 127 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 128 | platform_apis: true, |
| 129 | manifest: "AndroidManifest.xml", |
Chihhang Chuang | d2ece57 | 2021-06-17 22:40:26 +0800 | [diff] [blame] | 130 | additional_manifests: [":WallpaperPicker2_Manifest"], |
Alexander Martinz | 0eba31f | 2023-03-27 09:21:32 +0200 | [diff] [blame] | 131 | resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"], |
Michael W | da9e2e8 | 2022-04-06 21:57:11 +0200 | [diff] [blame] | 132 | overrides: [ |
| 133 | "WallpaperCropper", |
Danny Lin | 360f380 | 2021-10-05 19:00:36 -0700 | [diff] [blame] | 134 | "WallpaperPicker", |
Michael W | da9e2e8 | 2022-04-06 21:57:11 +0200 | [diff] [blame] | 135 | "WallpaperPicker2", |
| 136 | ], |
LuK1337 | b564211 | 2020-09-15 03:27:19 +0200 | [diff] [blame] | 137 | required: [ |
LuK1337 | b564211 | 2020-09-15 03:27:19 +0200 | [diff] [blame] | 138 | "privapp_whitelist_com.android.wallpaper" |
| 139 | ], |
| 140 | } |
| 141 | |
Alexander Martinz | 0eba31f | 2023-03-27 09:21:32 +0200 | [diff] [blame] | 142 | android_app { |
| 143 | name: "ThemePickerGms", |
| 144 | defaults: ["ThemePicker_defaults"], |
| 145 | |
| 146 | platform_apis: true, |
| 147 | manifest: "AndroidManifest.xml", |
| 148 | additional_manifests: [":WallpaperPicker2_Manifest"], |
| 149 | resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides_gms"], |
| 150 | overrides: [ |
| 151 | "ThemePicker", |
| 152 | "WallpaperCropper", |
| 153 | "WallpaperPicker", |
| 154 | "WallpaperPicker2", |
| 155 | ], |
| 156 | required: [ |
| 157 | "privapp_whitelist_com.android.wallpaper" |
| 158 | ], |
| 159 | } |
| 160 | |
LuK1337 | b564211 | 2020-09-15 03:27:19 +0200 | [diff] [blame] | 161 | prebuilt_etc { |
Luca Stefani | 3a29a8e | 2019-11-01 21:14:29 +0100 | [diff] [blame] | 162 | name: "privapp_whitelist_com.android.wallpaper", |
| 163 | system_ext_specific: true, |
| 164 | src: "privapp_whitelist_com.android.wallpaper.xml", |
| 165 | sub_dir: "permissions", |
| 166 | filename_from_src: true, |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 167 | } |