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", |
Chihhang Chuang | d2ece57 | 2021-06-17 22:40:26 +0800 | [diff] [blame] | 27 | // Min requirement for CustomizationInjector and StatsLogUserEventLogger to build without Clock and Theme feature. |
| 28 | "src/com/android/customization/model/clock/BaseClockManager.java", |
| 29 | "src/com/android/customization/model/clock/Clockface.java", |
| 30 | "src/com/android/customization/model/clock/ClockManager.java", |
| 31 | "src/com/android/customization/model/clock/ClockProvider.java", |
| 32 | "src/com/android/customization/model/theme/OverlayManagerCompat.java", |
| 33 | "src/com/android/customization/model/theme/ThemeBundleProvider.java", |
| 34 | "src/com/android/customization/model/theme/ThemeManager.java", |
| 35 | "src/com/android/customization/model/theme/ThemeBundle.java", |
| 36 | "src/com/android/customization/model/theme/custom/CustomTheme.java", |
| 37 | ], |
| 38 | exclude_srcs: [ |
| 39 | "src/com/android/customization/model/clock/**/*.java", |
| 40 | "src/com/android/customization/model/theme/**/*.java", |
| 41 | "src/com/android/customization/picker/clock/**/*.java", |
| 42 | "src/com/android/customization/picker/theme/**/*.java", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 43 | ], |
| 44 | } |
| 45 | |
| 46 | filegroup { |
| 47 | name: "ThemePicker_Manifest", |
| 48 | srcs: [ |
| 49 | "AndroidManifest.xml", |
| 50 | ], |
| 51 | } |
| 52 | |
| 53 | genrule { |
| 54 | name: "ThemePicker_res", |
| 55 | tools: ["soong_zip"], |
| 56 | srcs: [ |
| 57 | "res/**/*" |
| 58 | ], |
| 59 | out: ["ThemePicker_res.zip"], |
| 60 | cmd: "INPUTS=($(in)) && " |
| 61 | + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && " |
Colin Cross | 928f313 | 2021-05-11 18:32:09 +0000 | [diff] [blame] | 62 | + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR" |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | // |
| 66 | // Build app code. |
| 67 | // |
| 68 | android_app { |
| 69 | name: "ThemePicker", |
| 70 | |
| 71 | static_libs: [ |
| 72 | "wallpaper-common-deps", |
Chihhang Chuang | c21a3ff | 2021-06-08 12:53:24 +0800 | [diff] [blame] | 73 | "SettingsLibSettingsTheme", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 74 | "SystemUI-statsd", |
Chihhang Chuang | c21a3ff | 2021-06-08 12:53:24 +0800 | [diff] [blame] | 75 | "styleprotoslite", |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 76 | ], |
| 77 | |
| 78 | srcs: [ |
| 79 | ":WallpaperPicker2_srcs", |
| 80 | ":ThemePicker_srcs", |
| 81 | "src_override/**/*.java", |
| 82 | "src_override/**/*.kt", |
| 83 | ], |
| 84 | |
| 85 | use_embedded_native_libs: true, |
| 86 | |
| 87 | resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res"], |
| 88 | |
| 89 | optimize: { |
| 90 | enabled: false, |
| 91 | }, |
Santiago Etchebehere | 260beaf | 2021-03-16 18:53:50 -0700 | [diff] [blame] | 92 | kotlincflags: ["-Xjvm-default=enable"], |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 93 | certificate: "", |
| 94 | |
| 95 | privileged: true, |
| 96 | system_ext_specific: true, |
| 97 | platform_apis: true, |
| 98 | manifest: "AndroidManifest.xml", |
Chihhang Chuang | d2ece57 | 2021-06-17 22:40:26 +0800 | [diff] [blame] | 99 | additional_manifests: [":WallpaperPicker2_Manifest"], |
Santiago Etchebehere | 0b1d66e | 2021-03-04 18:25:05 -0800 | [diff] [blame] | 100 | overrides: ["WallpaperPicker2"], |
| 101 | } |