1// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_team: "trendy_team_android_rubidium",
17    default_applicable_licenses: ["packages_modules_ExtServices_license"],
18}
19
20// Added automatically by a large-scale-change
21// See: http://go/android-license-faq
22license {
23    name: "packages_modules_ExtServices_license",
24    visibility: [":__subpackages__"],
25    license_kinds: [
26        "SPDX-license-identifier-Apache-2.0",
27    ],
28    license_text: [
29        "NOTICE",
30    ],
31}
32
33android_library {
34    name: "ExtServices-core",
35    srcs: [
36        "java/src/**/*.java",
37    ],
38
39    sdk_version: "module_current",
40    min_sdk_version: "30",
41    resource_dirs: [
42        "java/res",
43    ],
44
45    manifest: "EmptyManifest.xml",
46
47    static_libs: [
48        "androidx.annotation_annotation",
49        "androidx.autofill_autofill",
50        "TextClassifierServiceLibNoManifest",
51        "TextClassifierNotificationLibNoManifest",
52        "androidx.work_work-runtime",
53        "modules-utils-build",
54        "androidx.appsearch_appsearch",
55        "androidx.appsearch_appsearch-platform-storage",
56        "android.service.notification.flags-aconfig-export-java",
57    ],
58
59    libs: [
60        "framework-platformcrashrecovery.stubs.module_lib",
61        "framework-configinfrastructure.stubs.module_lib",
62        "framework-connectivity.stubs.module_lib",
63    ],
64
65    lint: {
66        strict_updatability_linting: true,
67        error_checks: ["Recycle"],
68    },
69    apex_available: [
70        "//apex_available:platform",
71        "com.android.extservices",
72    ],
73}
74
75android_app {
76    name: "ExtServices-tplus",
77    sdk_version: "module_current",
78    min_sdk_version: "30",
79    manifest: "AndroidManifest.xml",
80    optimize: {
81        optimize: true,
82        shrink_resources: true,
83        proguard_compatibility: false,
84        proguard_flags_files: ["proguard.proguard"],
85    },
86    privileged: true,
87    privapp_allowlist: ":privapp_allowlist_android.ext_tplus.services.xml",
88    static_libs: [
89        "ExtServices-core",
90    ],
91    jarjar_rules: "jarjar-rules.txt",
92    jni_libs: [
93        "libtextclassifier",
94        "libextservices_jni",
95    ],
96    use_embedded_native_libs: true,
97    apex_available: [
98        "//apex_available:platform",
99        "com.android.extservices",
100        "test_com.android.extservices",
101    ],
102    updatable: true,
103}
104
105android_app {
106    name: "ExtServices-sminus",
107    sdk_version: "module_current",
108    min_sdk_version: "30",
109    manifest: "AndroidManifest.xml",
110    optimize: {
111        optimize: true,
112        shrink_resources: true,
113        proguard_compatibility: false,
114        proguard_flags_files: ["proguard.proguard"],
115    },
116    privileged: true,
117    privapp_allowlist: ":privapp_allowlist_android.ext_sminus.services.xml",
118    static_libs: [
119        "ExtServices-core",
120        "AdServices-core",
121    ],
122    jarjar_rules: "jarjar-rules.txt",
123    jni_libs: [
124        "libtextclassifier",
125        "libextservices_jni",
126        "libhpke_jni",
127    ],
128    libs: ["android.ext.adservices"],
129    optional_uses_libs: ["android.ext.adservices"],
130    use_embedded_native_libs: true,
131    apex_available: [
132        "//apex_available:platform",
133        "com.android.extservices",
134        "test_com.android.extservices",
135    ],
136    updatable: true,
137}
138