1// Copyright (C) 2024 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: ["Android-Apache-2.0"], 17} 18 19android_app_certificate { 20 name: "com.android.appsearch.apk.certificate", 21 certificate: "com.android.appsearch.apk", 22} 23 24soong_config_module_type { 25 name: "appsearch_java_defaults", 26 module_type: "java_defaults", 27 config_namespace: "appsearch", 28 bool_variables: [ 29 "enable_isolated_storage", 30 ], 31 properties: [ 32 "jni_libs", 33 ], 34} 35 36soong_config_bool_variable { 37 name: "enable_isolated_storage", 38} 39 40appsearch_java_defaults { 41 name: "appsearch-apk-defaults", 42 sdk_version: "module_current", 43 min_sdk_version: "Tiramisu", 44 srcs: ["src/**/*.java"], 45 static_libs: [ 46 "androidx.appcompat_appcompat", 47 "com.android.appsearch.isolated_storage_service.aidl-java", 48 "com.android.isolated_storage_service.aidl-java", 49 "statslog-appsearch-lib", 50 ], 51 libs: [ 52 "androidx.annotation_annotation", 53 "framework-virtualization.stubs.module_lib", 54 ], 55 jni_uses_platform_apis: true, 56 use_embedded_native_libs: true, 57 apex_available: ["com.android.appsearch"], 58 soong_config_variables: { 59 enable_isolated_storage: { 60 jni_libs: ["libisolated_storage_service"], 61 }, 62 }, 63} 64 65android_app { 66 name: "com.android.appsearch.apk", 67 sdk_version: "module_current", 68 min_sdk_version: "Tiramisu", 69 privileged: true, 70 updatable: true, 71 certificate: ":com.android.appsearch.apk.certificate", 72 defaults: [ 73 "appsearch-apk-defaults", 74 ], 75 compile_multilib: "first", 76 apex_available: ["com.android.appsearch"], 77} 78 79// A special library created strictly for use by the tests as they need the implementation library 80// but that is not available when building from prebuilts. Using a library with a different name to 81// what is used by the prebuilts ensures that this will never depend on the prebuilt. 82java_library { 83 name: "appsearch-apk-for-tests", 84 defaults: ["appsearch-apk-defaults"], 85} 86