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", |
Santiago Etchebehere | c49240a | 2021-03-16 18:53:22 -0700 | [diff] [blame] | 38 | "kotlinx-coroutines-android", |
| 39 | "kotlinx-coroutines-core", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 40 | "libbackup", |
Kunhung Li | d017436 | 2021-04-05 15:31:41 +0800 | [diff] [blame] | 41 | "SettingsLibCollapsingToolbarBaseActivity", |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 42 | "subsampling-scale-image-view", |
| 43 | "SystemUISharedLib", |
| 44 | "volley", |
| 45 | ], |
| 46 | |
| 47 | resource_dirs: ["res"], |
| 48 | |
| 49 | optimize: { |
| 50 | enabled: false, |
| 51 | }, |
| 52 | |
Santiago Etchebehere | c49240a | 2021-03-16 18:53:22 -0700 | [diff] [blame] | 53 | kotlincflags: ["-Xjvm-default=enable"], |
| 54 | |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 55 | sdk_version: "current", |
| 56 | |
| 57 | manifest: "AndroidManifest-empty.xml", |
| 58 | |
| 59 | visibility: [ |
| 60 | ":__subpackages__", |
| 61 | "//packages/apps/ThemePicker", |
| 62 | "//vendor:__subpackages__", |
| 63 | ], |
| 64 | } |
| 65 | |
| 66 | filegroup { |
| 67 | name: "WallpaperPicker2_srcs", |
| 68 | srcs: [ |
| 69 | "src/**/*.java", |
| 70 | "src/**/*.kt", |
| 71 | ], |
| 72 | } |
| 73 | |
| 74 | genrule { |
| 75 | name: "WallpaperPicker2_res", |
| 76 | tools: ["soong_zip"], |
| 77 | srcs: [ |
| 78 | "res/**/*" |
| 79 | ], |
| 80 | out: ["wallpaperpicker2_res.zip"], |
| 81 | cmd: "INPUTS=($(in)) && " |
| 82 | + "RES_DIR=$$(dirname $$(dirname $${INPUTS[0]})) && " |
Colin Cross | d593b7b | 2021-05-11 18:29:39 +0000 | [diff] [blame] | 83 | + "$(location soong_zip) -o $(out) -C $$RES_DIR -D $$RES_DIR" |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 84 | } |
| 85 | |
Chihhang Chuang | 2813cbd | 2021-06-17 22:28:56 +0800 | [diff] [blame] | 86 | filegroup { |
| 87 | name: "WallpaperPicker2_Manifest", |
| 88 | srcs: [ |
| 89 | "AndroidManifest.xml", |
| 90 | ], |
| 91 | } |
| 92 | |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 93 | java_defaults { |
| 94 | name: "WallpaperPicker2_defaults", |
| 95 | |
| 96 | static_libs: [ |
| 97 | "wallpaper-common-deps", |
| 98 | ], |
| 99 | |
| 100 | srcs: [ |
| 101 | ":WallpaperPicker2_srcs", |
| 102 | "src_override/**/*.java", |
| 103 | "src_override/**/*.kt", |
| 104 | ], |
| 105 | resource_zips: [":WallpaperPicker2_res"], |
| 106 | |
| 107 | certificate: "", |
| 108 | |
| 109 | optimize: { |
| 110 | enabled: false, |
| 111 | }, |
| 112 | |
Santiago Etchebehere | c49240a | 2021-03-16 18:53:22 -0700 | [diff] [blame] | 113 | kotlincflags: ["-Xjvm-default=enable"], |
Santiago Etchebehere | ac7512d | 2021-03-04 18:26:29 -0800 | [diff] [blame] | 114 | privileged: true, |
| 115 | system_ext_specific: true, |
| 116 | |
| 117 | use_embedded_native_libs: true, |
| 118 | |
| 119 | manifest: "AndroidManifest.xml", |
| 120 | } |
| 121 | |
| 122 | // |
| 123 | // Build app code. |
| 124 | // |
| 125 | android_app { |
| 126 | name: "WallpaperPicker2", |
| 127 | |
| 128 | defaults: ["WallpaperPicker2_defaults"], |
| 129 | |
| 130 | platform_apis: true, |
| 131 | } |