blob: f4e9bbcf9694ef6f28d75edeebabb2bf8818bf3e [file] [log] [blame]
Neil Fullerbe0b4e22020-11-09 15:26:16 +00001// 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 Badour7504dcc2021-03-26 18:07:03 -070016package {
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
Neil Fullerbe0b4e22020-11-09 15:26:16 +000020apex_defaults {
21 name: "com.android.geotz-defaults",
22 updatable: true,
Nikita Ioffe5d1166d2021-06-14 21:53:29 +010023 generate_hashtree: false,
Neil Fullerb82fe932021-06-16 17:15:27 +010024 min_sdk_version: "31",
Neil Fullerbe0b4e22020-11-09 15:26:16 +000025
26 // Explicit because the defaulting behavior only works for the real
27 // module.
28 file_contexts: ":com.android.geotz-file_contexts",
29
satayevd71080f2021-05-18 14:41:58 +010030 systemserverclasspath_fragments: ["com.android.geotz-systemserverclasspath-fragment"],
Neil Fullerbe0b4e22020-11-09 15:26:16 +000031
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
satayevd71080f2021-05-18 14:41:58 +010048// 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
Neil Fullerbe0b4e22020-11-09 15:26:16 +000058// 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/"],
Neil Fullereaec55e2021-03-08 16:00:10 +000072 srcs: [
73 "src/main/java/**/*.java",
74 ],
Neil Fullerbe0b4e22020-11-09 15:26:16 +000075 static_libs: [
76 "offlinelocationtimezoneprovider",
77 ],
Neil Fullerb82fe932021-06-16 17:15:27 +010078 sdk_version: "system_31",
satayevd71080f2021-05-18 14:41:58 +010079 // TODO(b/188773212): force dex compilation for inclusion in bootclasspath_fragment.
80 compile_dex: true,
Neil Fullerbe0b4e22020-11-09 15:26:16 +000081 apex_available: [
82 "com.android.geotz",
83 ],
84}