1//
2// Copyright (C) 2023 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
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19    default_visibility: [":__subpackages__"],
20}
21
22java_defaults {
23    name: "Java_Defaults",
24    srcs: [
25        "java/src/**/*.java",
26        "java/src/**/*.kt",
27    ],
28    resource_dirs: [
29        "java/res",
30    ],
31    manifest: "AndroidManifest-lib.xml",
32    min_sdk_version: "current",
33    lint: {
34        strict_updatability_linting: false,
35        extra_check_modules: ["SystemUILintChecker"],
36        warning_checks: ["MissingApacheLicenseDetector"],
37        baseline_filename: "lint-baseline.xml",
38    },
39}
40
41android_library {
42    name: "IntentResolver-core",
43    defaults: ["Java_Defaults"],
44    static_libs: [
45        "androidx.annotation_annotation",
46        "androidx.concurrent_concurrent-futures",
47        "androidx-constraintlayout_constraintlayout",
48        "androidx.recyclerview_recyclerview",
49        "androidx.viewpager_viewpager",
50        "androidx.lifecycle_lifecycle-common-java8",
51        "androidx.lifecycle_lifecycle-extensions",
52        "androidx.lifecycle_lifecycle-runtime-ktx",
53        "androidx.lifecycle_lifecycle-viewmodel-ktx",
54        "dagger2",
55        "hilt_android",
56        "IntentResolverFlagsLib",
57        "jsr330",
58        "kotlin-stdlib",
59        "kotlinx_coroutines",
60        "kotlinx-coroutines-android",
61        "//external/kotlinc:kotlin-annotations",
62        "guava",
63        "PlatformComposeCore",
64        "PlatformComposeSceneTransitionLayout",
65        "androidx.compose.runtime_runtime",
66        "androidx.compose.material3_material3",
67        "androidx.compose.material_material-icons-extended",
68        "androidx.activity_activity-compose",
69        "androidx.compose.animation_animation-graphics",
70        "androidx.lifecycle_lifecycle-viewmodel-compose",
71        "androidx.lifecycle_lifecycle-runtime-compose",
72    ],
73    javacflags: [
74        "-Adagger.fastInit=enabled",
75        "-Adagger.explicitBindingConflictsWithInject=ERROR",
76        "-Adagger.strictMultibindingValidation=enabled",
77    ],
78}
79
80java_defaults {
81    name: "App_Defaults",
82    min_sdk_version: "current",
83    platform_apis: true,
84    certificate: "platform",
85    privileged: true,
86    manifest: "AndroidManifest-app.xml",
87    required: [
88        "privapp_whitelist_com.android.intentresolver",
89    ],
90}
91
92android_app {
93    name: "IntentResolver",
94    defaults: ["App_Defaults"],
95    static_libs: [
96        "IntentResolver-core",
97    ],
98    optimize: {
99        enabled: true,
100        optimize: true,
101        shrink: true,
102        optimized_shrink_resources: true,
103        proguard_flags_files: ["proguard.flags"],
104    },
105    visibility: ["//visibility:public"],
106    apex_available: [
107        "//apex_available:platform",
108        "com.android.intentresolver",
109        "test_com.android.intentresolver",
110    ],
111}
112