1// Copyright (C) 2019 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 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "packages_modules_appsearch_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["packages_modules_appsearch_license"], 22} 23 24filegroup { 25 name: "framework-appsearch-sources", 26 defaults: ["framework-sources-module-defaults"], 27 srcs: [ 28 ":framework-appsearch-external-sources", 29 ":framework-appsearch-internal-sources", 30 ], 31 visibility: ["//packages/modules/AppSearch:__subpackages__"], 32} 33 34filegroup { 35 name: "framework-appsearch-internal-sources", 36 srcs: [ 37 "java/**/*.aidl", 38 "java/**/*.java", 39 ], 40 exclude_srcs: [ 41 ":framework-appsearch-external-sources", 42 ], 43 path: "java", 44} 45 46filegroup { 47 name: "framework-appsearch-external-sources", 48 srcs: [ 49 "java/external/**/*.aidl", 50 "java/external/**/*.java", 51 ], 52 path: "java/external", 53} 54 55java_sdk_library { 56 name: "framework-appsearch", 57 srcs: [":framework-appsearch-sources"], 58 sdk_version: "module_current", 59 min_sdk_version: "Tiramisu", 60 libs: [ 61 "jspecify", 62 "unsupportedappusage", 63 ], 64 static_libs: [ 65 // This list must be kept in sync with jarjar.txt 66 "appsearch_flags_java_lib", 67 "modules-utils-preconditions", 68 ], 69 optimize: { 70 enabled: true, 71 optimize: true, 72 shrink: true, 73 // Enable R8 compat mode. R8 full mode implicitly adds -allowaccessmodification, 74 // which may cause non-public fields and methods to become public. 75 proguard_compatibility: true, 76 proguard_flags_files: ["proguard.flags"], 77 }, 78 plugins: [ 79 "safeparcel-annotation-processor", 80 ], 81 defaults: ["framework-module-defaults"], 82 // WARNING: As part of the boot classpath, this framework target's permitted 83 // packages list should *only* contain packages that are entirely and 84 // exclusively owned by this module. Do not add additional packages 85 // (including any packages for dependencies) without first consulting 86 // mainline/API owners. 87 permitted_packages: [ 88 "android.app.appsearch", 89 ], 90 jarjar_rules: "jarjar-rules.txt", 91 apex_available: ["com.android.appsearch"], 92 impl_library_visibility: [ 93 "//cts/tests/appsearch:__subpackages__", 94 "//packages/modules/AppSearch/service:__subpackages__", 95 "//packages/modules/AppSearch/testing:__subpackages__", 96 ], 97 aconfig_declarations: [ 98 "appsearch_aconfig_flags", 99 ], 100 lint: { 101 baseline_filename: "lint-baseline.xml", 102 }, 103} 104