Neil Fuller | be0b4e2 | 2020-11-09 15:26:16 +0000 | [diff] [blame] | 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. |
Bob Badour | 7504dcc | 2021-03-26 18:07:03 -0700 | [diff] [blame] | 16 | package { |
| 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
Neil Fuller | be0b4e2 | 2020-11-09 15:26:16 +0000 | [diff] [blame] | 20 | apex_defaults { |
| 21 | name: "com.android.geotz-defaults", |
| 22 | updatable: true, |
Nikita Ioffe | 5d1166d | 2021-06-14 21:53:29 +0100 | [diff] [blame] | 23 | generate_hashtree: false, |
Neil Fuller | b82fe93 | 2021-06-16 17:15:27 +0100 | [diff] [blame] | 24 | min_sdk_version: "31", |
Neil Fuller | be0b4e2 | 2020-11-09 15:26:16 +0000 | [diff] [blame] | 25 | |
| 26 | // Explicit because the defaulting behavior only works for the real |
| 27 | // module. |
| 28 | file_contexts: ":com.android.geotz-file_contexts", |
| 29 | |
satayev | d71080f | 2021-05-18 14:41:58 +0100 | [diff] [blame] | 30 | systemserverclasspath_fragments: ["com.android.geotz-systemserverclasspath-fragment"], |
Neil Fuller | be0b4e2 | 2020-11-09 15:26:16 +0000 | [diff] [blame] | 31 | |
| 32 | // Shared signing information. |
| 33 | key: "com.android.geotz.key", |
| 34 | certificate: ":com.android.geotz.certificate", |
| 35 | } |
| 36 | |
| 37 | apex_key { |
| 38 | name: "com.android.geotz.key", |
| 39 | public_key: "com.android.geotz.avbpubkey", |
| 40 | private_key: "com.android.geotz.pem", |
| 41 | } |
| 42 | |
| 43 | android_app_certificate { |
| 44 | name: "com.android.geotz.certificate", |
| 45 | certificate: "com.android.geotz", |
| 46 | } |
| 47 | |
satayev | d71080f | 2021-05-18 14:41:58 +0100 | [diff] [blame] | 48 | // Encapsulate the contributions made by the com.android.geotz to the systemserverclasspath. |
| 49 | systemserverclasspath_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 | |
Neil Fuller | be0b4e2 | 2020-11-09 15:26:16 +0000 | [diff] [blame] | 58 | // The definition for the real (not test) geotz APEX. |
| 59 | apex { |
| 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. |
| 69 | java_library { |
| 70 | name: "geotz", |
| 71 | java_resource_dirs: ["resources/"], |
Neil Fuller | eaec55e | 2021-03-08 16:00:10 +0000 | [diff] [blame] | 72 | srcs: [ |
| 73 | "src/main/java/**/*.java", |
| 74 | ], |
Neil Fuller | be0b4e2 | 2020-11-09 15:26:16 +0000 | [diff] [blame] | 75 | static_libs: [ |
| 76 | "offlinelocationtimezoneprovider", |
| 77 | ], |
Neil Fuller | b82fe93 | 2021-06-16 17:15:27 +0100 | [diff] [blame] | 78 | sdk_version: "system_31", |
satayev | d71080f | 2021-05-18 14:41:58 +0100 | [diff] [blame] | 79 | // TODO(b/188773212): force dex compilation for inclusion in bootclasspath_fragment. |
| 80 | compile_dex: true, |
Neil Fuller | be0b4e2 | 2020-11-09 15:26:16 +0000 | [diff] [blame] | 81 | apex_available: [ |
| 82 | "com.android.geotz", |
| 83 | ], |
| 84 | } |