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_applicable_licenses: ["packages_modules_ExtServices_license"], 17} 18 19// Added automatically by a large-scale-change 20// See: http://go/android-license-faq 21license { 22 name: "packages_modules_ExtServices_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-Apache-2.0", 26 ], 27 license_text: [ 28 "NOTICE", 29 ], 30} 31 32android_library { 33 name: "ExtServices-core", 34 srcs: [ 35 "java/src/**/*.java", 36 ], 37 38 // Need to use empty manifest to avoid getting INSTALL_FAILED_DUPLICATE_PERMISSION when running 39 // unit tests, because the manifest is included in this library which is statically included in 40 // the test module. The actual manifest is included in the android_app target below. 41 manifest: "EmptyManifest.xml", 42 43 sdk_version: "module_current", 44 min_sdk_version: "30", 45 resource_dirs: [ 46 "java/res", 47 ], 48 static_libs: [ 49 "androidx.annotation_annotation", 50 "androidx.autofill_autofill", 51 "TextClassifierServiceLibNoManifest", 52 "TextClassifierNotificationLibNoManifest", 53 "androidx.work_work-runtime", 54 "modules-utils-build", 55 ], 56 57 libs : [ 58 "framework-configinfrastructure", 59 "framework-connectivity", 60 ], 61 62 lint: { 63 strict_updatability_linting: true, 64 }, 65} 66 67android_app { 68 name: "ExtServices", 69 sdk_version: "module_current", 70 min_sdk_version: "30", 71 manifest: "AndroidManifest.xml", 72 optimize: { 73 optimize: true, 74 shrink_resources: true, 75 proguard_compatibility: false, 76 proguard_flags_files: ["proguard.proguard"], 77 }, 78 privileged: true, 79 static_libs: [ 80 "ExtServices-core", 81 ], 82 jarjar_rules: "jarjar-rules.txt", 83 jni_libs: ["libtextclassifier", "libextservices_jni"], 84 use_embedded_native_libs: true, 85 required: ["privapp_allowlist_android.ext.services.xml"], 86 apex_available: [ 87 "//apex_available:platform", 88 "com.android.extservices", 89 "test_com.android.extservices", 90 ], 91} 92