1// Copyright (C) 2020 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 15// Defaults shared between real and test versions of the APEX. 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20apex_defaults { 21 name: "com.android.geotz-defaults", 22 updatable: true, 23 generate_hashtree: false, 24 min_sdk_version: "31", 25 26 // Explicit because the defaulting behavior only works for the real 27 // module. 28 file_contexts: ":com.android.geotz-file_contexts", 29 30 systemserverclasspath_fragments: ["com.android.geotz-systemserverclasspath-fragment"], 31 32 // Shared signing information. 33 key: "com.android.geotz.key", 34 certificate: ":com.android.geotz.certificate", 35} 36 37apex_key { 38 name: "com.android.geotz.key", 39 public_key: "com.android.geotz.avbpubkey", 40 private_key: "com.android.geotz.pem", 41} 42 43android_app_certificate { 44 name: "com.android.geotz.certificate", 45 certificate: "com.android.geotz", 46} 47 48// Encapsulate the contributions made by the com.android.geotz to the systemserverclasspath. 49systemserverclasspath_fragment { 50 name: "com.android.geotz-systemserverclasspath-fragment", 51 // This name is hardcoded on Android S with associated AndroidManifest.xml 52 // entries in the system server. Do not remove until all releases use an 53 // APK. 54 contents: ["geotz"], 55 apex_available: ["com.android.geotz"], 56} 57 58// The definition for the real (not test) geotz APEX. 59apex { 60 name: "com.android.geotz", 61 defaults: ["com.android.geotz-defaults"], 62 manifest: "manifest.json", 63 prebuilts: [ 64 "apex_tzs2.dat", 65 ], 66} 67 68// A library intended to be added to the system server classpath. 69java_library { 70 name: "geotz", 71 java_resource_dirs: ["resources/"], 72 srcs: [ 73 "src/main/java/**/*.java", 74 ], 75 libs: [ 76 "androidx.annotation_annotation", 77 ], 78 static_libs: [ 79 "offlinelocationtimezoneprovider", 80 ], 81 sdk_version: "system_31", 82 // TODO(b/188773212): force dex compilation for inclusion in bootclasspath_fragment. 83 compile_dex: true, 84 apex_available: [ 85 "com.android.geotz", 86 ], 87} 88