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        "iconloader",
58        "jsr330",
59        "kotlin-stdlib",
60        "kotlinx_coroutines",
61        "kotlinx-coroutines-android",
62        "//external/kotlinc:kotlin-annotations",
63        "guava",
64        "PlatformComposeCore",
65        "PlatformComposeSceneTransitionLayout",
66        "androidx.compose.runtime_runtime",
67        "androidx.compose.material3_material3",
68        "androidx.compose.material_material-icons-extended",
69        "androidx.activity_activity-compose",
70        "androidx.compose.animation_animation-graphics",
71        "androidx.lifecycle_lifecycle-viewmodel-compose",
72        "androidx.lifecycle_lifecycle-runtime-compose",
73    ],
74    javacflags: [
75        "-Adagger.fastInit=enabled",
76        "-Adagger.explicitBindingConflictsWithInject=ERROR",
77        "-Adagger.strictMultibindingValidation=enabled",
78    ],
79}
80
81java_defaults {
82    name: "App_Defaults",
83    min_sdk_version: "current",
84    platform_apis: true,
85    certificate: "platform",
86    privileged: true,
87    manifest: "AndroidManifest-app.xml",
88    required: [
89        "privapp_whitelist_com.android.intentresolver",
90    ],
91}
92
93android_app {
94    name: "IntentResolver",
95    defaults: ["App_Defaults"],
96    static_libs: [
97        "IntentResolver-core",
98    ],
99    optimize: {
100        enabled: true,
101        optimize: true,
102        shrink: true,
103        optimized_shrink_resources: true,
104        proguard_flags_files: ["proguard.flags"],
105    },
106    visibility: ["//visibility:public"],
107    apex_available: [
108        "//apex_available:platform",
109        "com.android.intentresolver",
110        "test_com.android.intentresolver",
111    ],
112}
113