Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -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 | // Build rule for WallpaperPicker2 dependencies lib. |
| 19 | // |
Bob Badour | 2021dd7 | 2021-03-19 03:57:19 -0700 | [diff] [blame] | 20 | package { |
| 21 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 22 | } |
| 23 | |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 24 | android_library { |
| 25 | name: "wallpaper-common-deps", |
| 26 | |
| 27 | static_libs: [ |
| 28 | "androidx.appcompat_appcompat", |
| 29 | "androidx.cardview_cardview", |
Chihhang Chuang | 11f5efb | 2021-06-29 15:15:46 +0800 | [diff] [blame] | 30 | "androidx-constraintlayout_constraintlayout", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 31 | "androidx.exifinterface_exifinterface", |
Santiago Etchebehere | c49240a | 2021-03-16 18:53:22 -0700 | [diff] [blame] | 32 | "androidx.lifecycle_lifecycle-runtime-ktx", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 33 | "androidx.recyclerview_recyclerview", |
| 34 | "androidx.slice_slice-view", |
Chihhang Chuang | 11f5efb | 2021-06-29 15:15:46 +0800 | [diff] [blame] | 35 | "androidx.viewpager2_viewpager2", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 36 | "com.google.android.material_material", |
| 37 | "glide-prebuilt", |
Biswarup Pal | 591a177 | 2021-08-25 20:01:32 +0000 | [diff] [blame] | 38 | "glide-gifdecoder-prebuilt", |
| 39 | "glide-disklrucache-prebuilt", |
Santiago Etchebehere | c49240a | 2021-03-16 18:53:22 -0700 | [diff] [blame] | 40 | "kotlinx-coroutines-android", |
| 41 | "kotlinx-coroutines-core", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 42 | "libbackup", |
Kunhung Li | d017436 | 2021-04-05 15:31:41 +0800 | [diff] [blame] | 43 | "SettingsLibCollapsingToolbarBaseActivity", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 44 | "subsampling-scale-image-view", |
| 45 | "SystemUISharedLib", |
Hawkwood Glazier | 340f4df | 2022-11-11 18:13:55 +0000 | [diff] [blame] | 46 | "SystemUICustomizationLib", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 47 | "volley", |
John Pan | 0a56951 | 2022-03-15 19:50:42 +0800 | [diff] [blame] | 48 | "SettingsLibActivityEmbedding", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 49 | ], |
| 50 | |
| 51 | resource_dirs: ["res"], |
| 52 | |
| 53 | optimize: { |
| 54 | enabled: false, |
| 55 | }, |
| 56 | |
Santiago Etchebehere | c49240a | 2021-03-16 18:53:22 -0700 | [diff] [blame] | 57 | kotlincflags: ["-Xjvm-default=enable"], |
| 58 | |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 59 | sdk_version: "current", |
| 60 | |
| 61 | manifest: "AndroidManifest-empty.xml", |
| 62 | |
| 63 | visibility: [ |
| 64 | ":__subpackages__", |
Chris Poultney | c267b3e | 2022-12-20 20:18:06 +0000 | [diff] [blame^] | 65 | "//packages/apps/ThemePicker:__subpackages__", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 66 | "//vendor:__subpackages__", |
| 67 | ], |
| 68 | } |
| 69 | |
| 70 | filegroup { |
| 71 | name: "WallpaperPicker2_srcs", |
| 72 | srcs: [ |
| 73 | "src/**/*.java", |
| 74 | "src/**/*.kt", |
| 75 | ], |
| 76 | } |
| 77 | |
Chris Poultney | 02698d8 | 2022-09-20 18:28:35 +0000 | [diff] [blame] | 78 | // If these targets are included in WallpaperPicker2_defaults directly instead of in a filegroup, |
| 79 | // the tests can't find them. |
| 80 | filegroup { |
| 81 | name: "WallpaperPicker2_src_overrides", |
| 82 | srcs: [ |
| 83 | "src_override/**/*.java", |
| 84 | "src_override/**/*.kt", |
| 85 | ], |
| 86 | } |
| 87 | |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 88 | genrule { |
| 89 | name: "WallpaperPicker2_res", |
| 90 | tools: ["soong_zip"], |
| 91 | srcs: [ |
| 92 | "res/**/*" |
| 93 | ], |
| 94 | out: ["wallpaperpicker2_res.zip"], |
| 95 | cmd: "INPUTS=($(in)) && " |
| 96 | + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && " |
Colin Cross | d593b7b | 2021-05-11 18:29:39 +0000 | [diff] [blame] | 97 | + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR" |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 98 | } |
| 99 | |
Chihhang Chuang | 2813cbd | 2021-06-17 22:28:56 +0800 | [diff] [blame] | 100 | filegroup { |
| 101 | name: "WallpaperPicker2_Manifest", |
| 102 | srcs: [ |
| 103 | "AndroidManifest.xml", |
| 104 | ], |
| 105 | } |
| 106 | |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 107 | java_defaults { |
| 108 | name: "WallpaperPicker2_defaults", |
| 109 | |
| 110 | static_libs: [ |
| 111 | "wallpaper-common-deps", |
George Lin | fc09fe0 | 2022-08-23 17:12:23 +0000 | [diff] [blame] | 112 | "monet", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 113 | ], |
| 114 | |
| 115 | srcs: [ |
| 116 | ":WallpaperPicker2_srcs", |
Chris Poultney | 02698d8 | 2022-09-20 18:28:35 +0000 | [diff] [blame] | 117 | ":WallpaperPicker2_src_overrides", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 118 | ], |
| 119 | resource_zips: [":WallpaperPicker2_res"], |
| 120 | |
| 121 | certificate: "", |
| 122 | |
| 123 | optimize: { |
| 124 | enabled: false, |
| 125 | }, |
| 126 | |
Santiago Etchebehere | c49240a | 2021-03-16 18:53:22 -0700 | [diff] [blame] | 127 | kotlincflags: ["-Xjvm-default=enable"], |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 128 | privileged: true, |
| 129 | system_ext_specific: true, |
| 130 | |
| 131 | use_embedded_native_libs: true, |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | // |
| 135 | // Build app code. |
| 136 | // |
| 137 | android_app { |
| 138 | name: "WallpaperPicker2", |
| 139 | |
| 140 | defaults: ["WallpaperPicker2_defaults"], |
Chris Poultney | 02698d8 | 2022-09-20 18:28:35 +0000 | [diff] [blame] | 141 | manifest: ":WallpaperPicker2_Manifest", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 142 | |
| 143 | platform_apis: true, |
| 144 | } |