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 | |
| 69 | java_defaults { |
| 70 | name: "ThemePicker_defaults", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 71 | |
| 72 | static_libs: [ |
Kunhung Li | 53fc4d5 | 2022-02-12 16:58:06 +0800 | [diff] [blame] | 73 | "guava", |
| 74 | "monet", |
Alejandro Nijamkin | 0f02b08 | 2022-11-24 13:43:43 -0800 | [diff] [blame] | 75 | "renderscript_toolkit", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 76 | "wallpaper-common-deps", |
Chihhang Chuang | c21a3ff | 2021-06-08 12:53:24 +0800 | [diff] [blame] | 77 | "SettingsLibSettingsTheme", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 78 | "SystemUI-statsd", |
Chihhang Chuang | c21a3ff | 2021-06-08 12:53:24 +0800 | [diff] [blame] | 79 | "styleprotoslite", |
Alejandro Nijamkin | 7a06228 | 2023-02-06 13:38:40 -0800 | [diff] [blame] | 80 | "androidx.lifecycle_lifecycle-livedata-ktx", |
Alejandro Nijamkin | 0f02b08 | 2022-11-24 13:43:43 -0800 | [diff] [blame] | 81 | "androidx.lifecycle_lifecycle-runtime-ktx", |
| 82 | "androidx.lifecycle_lifecycle-viewmodel-ktx", |
| 83 | "androidx.recyclerview_recyclerview", |
| 84 | "SystemUICustomizationLib", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 85 | ], |
| 86 | |
Ching-Sung Li | bdf3422 | 2022-03-30 15:19:13 +0800 | [diff] [blame] | 87 | jni_libs: [ |
| 88 | "librenderscript-toolkit", |
| 89 | ], |
| 90 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 91 | srcs: [ |
| 92 | ":WallpaperPicker2_srcs", |
| 93 | ":ThemePicker_srcs", |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 94 | ":ThemePicker_src_overrides", |
George Lin | 621fb8f | 2022-07-29 21:13:41 +0000 | [diff] [blame] | 95 | ], |
| 96 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 97 | use_embedded_native_libs: true, |
| 98 | |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 99 | resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"], |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 100 | |
| 101 | optimize: { |
| 102 | enabled: false, |
| 103 | }, |
Santiago Etchebehere | 260beaf | 2021-03-16 18:53:50 -0700 | [diff] [blame] | 104 | kotlincflags: ["-Xjvm-default=enable"], |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 105 | certificate: "", |
| 106 | |
| 107 | privileged: true, |
| 108 | system_ext_specific: true, |
Chris Poultney | f510906 | 2022-12-20 19:57:42 +0000 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | // |
| 112 | // Build app code. |
| 113 | // |
| 114 | android_app { |
| 115 | name: "ThemePicker", |
| 116 | defaults: ["ThemePicker_defaults"], |
| 117 | |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 118 | platform_apis: true, |
| 119 | manifest: "AndroidManifest.xml", |
Chihhang Chuang | d2ece57 | 2021-06-17 22:40:26 +0800 | [diff] [blame] | 120 | additional_manifests: [":WallpaperPicker2_Manifest"], |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 121 | overrides: ["WallpaperPicker2"], |
| 122 | } |