Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [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 | package { |
| 18 | // See: http://go/android-license-faq |
| 19 | // This was chosen for Sharesheet to match existing packages. |
| 20 | default_applicable_licenses: ["packages_modules_IntentResolver_license"], |
| 21 | } |
| 22 | |
| 23 | license { |
| 24 | name: "packages_modules_IntentResolver_license", |
| 25 | visibility: [":__subpackages__"], |
| 26 | license_kinds: [ |
| 27 | "SPDX-license-identifier-Apache-2.0", |
| 28 | ], |
| 29 | license_text: [ |
| 30 | "NOTICE", |
| 31 | ], |
| 32 | } |
| 33 | |
Andrey Epin | 50a7e3e | 2022-12-20 10:17:36 -0800 | [diff] [blame] | 34 | filegroup { |
| 35 | name: "ReleaseSources", |
| 36 | srcs: [ |
| 37 | "java/src-release/**/*.kt", |
| 38 | ], |
| 39 | } |
| 40 | |
| 41 | filegroup { |
| 42 | name: "DebugSources", |
| 43 | srcs: [ |
| 44 | "java/src-debug/**/*.kt", |
| 45 | ], |
| 46 | } |
| 47 | |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 48 | android_library { |
| 49 | name: "IntentResolver-core", |
Matt Casey | bca35af | 2022-02-01 21:55:27 -0500 | [diff] [blame] | 50 | min_sdk_version: "current", |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 51 | srcs: [ |
| 52 | "java/src/**/*.java", |
Andrey Epin | 4b933df | 2022-10-16 11:44:33 -0700 | [diff] [blame] | 53 | "java/src/**/*.kt", |
Andrey Epin | 50a7e3e | 2022-12-20 10:17:36 -0800 | [diff] [blame] | 54 | ":ReleaseSources", |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 55 | ], |
Andrey Epin | 50a7e3e | 2022-12-20 10:17:36 -0800 | [diff] [blame] | 56 | product_variables: { |
| 57 | debuggable: { |
| 58 | srcs: [":DebugSources"], |
| 59 | exclude_srcs: [":ReleaseSources"], |
| 60 | } |
| 61 | }, |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 62 | resource_dirs: [ |
| 63 | "java/res", |
| 64 | ], |
| 65 | |
| 66 | manifest: "AndroidManifest.xml", |
| 67 | |
| 68 | static_libs: [ |
| 69 | "androidx.annotation_annotation", |
Joshua Trask | e2463f3 | 2022-11-09 16:15:56 -0500 | [diff] [blame] | 70 | "androidx.concurrent_concurrent-futures", |
Joshua Trask | c168f98 | 2022-10-05 12:59:07 -0400 | [diff] [blame] | 71 | "androidx.recyclerview_recyclerview", |
| 72 | "androidx.viewpager_viewpager", |
Andrey Epin | 93d10c4 | 2022-10-05 11:43:30 -0700 | [diff] [blame] | 73 | "androidx.lifecycle_lifecycle-common-java8", |
| 74 | "androidx.lifecycle_lifecycle-extensions", |
Andrey Epin | fb2ee59 | 2022-12-23 15:45:43 -0800 | [diff] [blame] | 75 | "androidx.lifecycle_lifecycle-runtime-ktx", |
| 76 | "androidx.lifecycle_lifecycle-viewmodel-ktx", |
| 77 | "kotlin-stdlib", |
| 78 | "kotlinx_coroutines", |
| 79 | "kotlinx-coroutines-android", |
| 80 | "//external/kotlinc:kotlin-annotations", |
Joshua Trask | e2463f3 | 2022-11-09 16:15:56 -0500 | [diff] [blame] | 81 | "guava", |
Andrey Epin | 50a7e3e | 2022-12-20 10:17:36 -0800 | [diff] [blame] | 82 | "SystemUIFlagsLib", |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 83 | ], |
| 84 | |
| 85 | plugins: ["java_api_finder"], |
| 86 | lint: { |
Andrey Epin | 50a7e3e | 2022-12-20 10:17:36 -0800 | [diff] [blame] | 87 | strict_updatability_linting: false, |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 88 | }, |
| 89 | } |
| 90 | |
| 91 | android_app { |
| 92 | name: "IntentResolver", |
Matt Casey | bca35af | 2022-02-01 21:55:27 -0500 | [diff] [blame] | 93 | min_sdk_version: "current", |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 94 | certificate: "platform", |
| 95 | privileged: true, |
Joshua Trask | 6538ea6 | 2021-11-17 15:35:03 -0500 | [diff] [blame] | 96 | required: [ |
| 97 | "privapp_whitelist_com.android.intentresolver", |
| 98 | ], |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 99 | srcs: ["src/**/*.java"], |
| 100 | platform_apis: true, |
| 101 | static_libs: [ |
| 102 | "IntentResolver-core", |
| 103 | ], |
Joshua Trask | 0263250 | 2022-09-20 13:58:08 -0400 | [diff] [blame] | 104 | optimize: { |
Joshua Trask | 61d7310 | 2022-10-18 13:41:42 -0400 | [diff] [blame] | 105 | enabled: true, |
Joshua Trask | 0263250 | 2022-09-20 13:58:08 -0400 | [diff] [blame] | 106 | }, |
Joshua Trask | e514d3d | 2021-11-01 17:12:57 -0400 | [diff] [blame] | 107 | apex_available: [ |
| 108 | "//apex_available:platform", |
| 109 | "com.android.intentresolver", |
| 110 | "test_com.android.intentresolver", |
| 111 | ], |
| 112 | } |