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 | |
| 18 | filegroup { |
| 19 | name: "ThemePicker_srcs", |
| 20 | srcs: [ |
| 21 | "src/**/*.java", |
| 22 | "src/**/*.kt", |
| 23 | ], |
| 24 | } |
| 25 | |
| 26 | filegroup { |
| 27 | name: "ThemePicker_Manifest", |
| 28 | srcs: [ |
| 29 | "AndroidManifest.xml", |
| 30 | ], |
| 31 | } |
| 32 | |
| 33 | genrule { |
| 34 | name: "ThemePicker_res", |
| 35 | tools: ["soong_zip"], |
| 36 | srcs: [ |
| 37 | "res/**/*" |
| 38 | ], |
| 39 | out: ["ThemePicker_res.zip"], |
| 40 | cmd: "INPUTS=($(in)) && " |
| 41 | + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && " |
| 42 | + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR && " |
| 43 | + "cp $(out) ." |
| 44 | } |
| 45 | |
| 46 | // |
| 47 | // Build app code. |
| 48 | // |
| 49 | android_app { |
| 50 | name: "ThemePicker", |
| 51 | |
| 52 | static_libs: [ |
| 53 | "wallpaper-common-deps", |
| 54 | "styleprotoslite", |
| 55 | "SystemUI-statsd", |
| 56 | ], |
| 57 | |
| 58 | srcs: [ |
| 59 | ":WallpaperPicker2_srcs", |
| 60 | ":ThemePicker_srcs", |
| 61 | "src_override/**/*.java", |
| 62 | "src_override/**/*.kt", |
| 63 | ], |
| 64 | |
| 65 | use_embedded_native_libs: true, |
| 66 | |
| 67 | resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res"], |
| 68 | |
| 69 | optimize: { |
| 70 | enabled: false, |
| 71 | }, |
| 72 | |
| 73 | certificate: "", |
| 74 | |
| 75 | privileged: true, |
| 76 | system_ext_specific: true, |
| 77 | platform_apis: true, |
| 78 | manifest: "AndroidManifest.xml", |
| 79 | overrides: ["WallpaperPicker2"], |
| 80 | } |