summaryrefslogtreecommitdiff
path: root/Android.bp
diff options
context:
space:
mode:
Diffstat (limited to 'Android.bp')
-rw-r--r--Android.bp85
1 files changed, 31 insertions, 54 deletions
diff --git a/Android.bp b/Android.bp
index 9d0a8ee6..674aae1f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,5 @@
//
-// Copyright (C) 2021 The Android Open Source Project
+// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -15,56 +15,29 @@
//
package {
- // See: http://go/android-license-faq
- // This was chosen for Sharesheet to match existing packages.
- default_applicable_licenses: ["packages_modules_IntentResolver_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
+ default_visibility: [":__subpackages__"],
}
-license {
- name: "packages_modules_IntentResolver_license",
- visibility: [":__subpackages__"],
- license_kinds: [
- "SPDX-license-identifier-Apache-2.0",
- ],
- license_text: [
- "NOTICE",
- ],
-}
-
-filegroup {
- name: "ReleaseSources",
- srcs: [
- "java/src-release/**/*.kt",
- ],
-}
-
-filegroup {
- name: "DebugSources",
- srcs: [
- "java/src-debug/**/*.kt",
- ],
-}
-
-android_library {
- name: "IntentResolver-core",
- min_sdk_version: "current",
+java_defaults {
+ name: "Java_Defaults",
srcs: [
"java/src/**/*.java",
"java/src/**/*.kt",
- ":ReleaseSources",
],
- product_variables: {
- debuggable: {
- srcs: [":DebugSources"],
- exclude_srcs: [":ReleaseSources"],
- }
- },
resource_dirs: [
"java/res",
],
-
manifest: "AndroidManifest-lib.xml",
+ min_sdk_version: "current",
+ lint: {
+ strict_updatability_linting: false,
+ },
+}
+android_library {
+ name: "IntentResolver-core",
+ defaults: ["Java_Defaults"],
static_libs: [
"androidx.annotation_annotation",
"androidx.concurrent_concurrent-futures",
@@ -75,43 +48,47 @@ android_library {
"androidx.lifecycle_lifecycle-extensions",
"androidx.lifecycle_lifecycle-runtime-ktx",
"androidx.lifecycle_lifecycle-viewmodel-ktx",
+ "dagger2",
+ "hilt_android",
+ "IntentResolverFlagsLib",
+ "jsr330",
"kotlin-stdlib",
"kotlinx_coroutines",
"kotlinx-coroutines-android",
"//external/kotlinc:kotlin-annotations",
"guava",
- "SystemUIFlagsLib",
],
-
- lint: {
- strict_updatability_linting: false,
- },
-
- optimize: {
- proguard_flags_files: ["proguard.flags"],
- },
}
-android_app {
- name: "IntentResolver",
+java_defaults {
+ name: "App_Defaults",
min_sdk_version: "current",
+ platform_apis: true,
certificate: "platform",
privileged: true,
manifest: "AndroidManifest-app.xml",
required: [
"privapp_whitelist_com.android.intentresolver",
],
- srcs: ["src/**/*.java"],
- platform_apis: true,
+}
+
+android_app {
+ name: "IntentResolver",
+ defaults: ["App_Defaults"],
static_libs: [
"IntentResolver-core",
],
optimize: {
enabled: true,
+ optimize: true,
+ shrink: true,
+ shrink_resources: true,
+ proguard_flags_files: ["proguard.flags"],
},
+ visibility: ["//visibility:public"],
apex_available: [
"//apex_available:platform",
"com.android.intentresolver",
"test_com.android.intentresolver",
],
-}
+} \ No newline at end of file