xref: /aosp_15_r20/system/timezone/output_data/Android.bp (revision 2fd832c65f8b41db7ddb4ac802b9196762fe4888)
1// Copyright (C) 2018 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    // http://go/android-license-faq
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20license {
21    name: "system_timezone_output_data_iana_licence",
22    visibility: ["//visibility:private"],
23    license_kinds: [
24        "SPDX-license-identifier-BSD",
25        "legacy_unencumbered",
26    ],
27    license_text: [
28        "iana/NOTICE",
29    ],
30}
31
32license {
33    name: "system_timezone_output_data_icu_licence",
34    visibility: ["//visibility:private"],
35    license_kinds: [
36        "SPDX-license-identifier-BSD",
37        "SPDX-license-identifier-MIT",
38        "SPDX-license-identifier-Unicode-3.0",
39    ],
40    license_text: [
41        "icu_overlay/LICENSE",
42    ],
43}
44
45prebuilt_etc {
46    name: "apex_tz_version",
47    src: "version/tz_version",
48    filename: "tz_version",
49    sub_dir: "tz",
50    installable: false,
51}
52
53prebuilt_etc {
54    name: "apex_tzdata",
55    src: "iana/tzdata",
56    licenses: ["system_timezone_output_data_iana_licence"],
57    filename: "tzdata",
58    sub_dir: "tz",
59    installable: false,
60}
61
62prebuilt_etc {
63    name: "apex_tz_version_ver8",
64    src: "version/tz_version",
65    filename: "tz_version",
66    sub_dir: "tz/versioned/8",
67    installable: false,
68}
69
70prebuilt_etc {
71    name: "apex_tzdata_ver8",
72    src: "iana/tzdata",
73    licenses: ["system_timezone_output_data_iana_licence"],
74    filename: "tzdata",
75    sub_dir: "tz/versioned/8",
76    installable: false,
77}
78
79prebuilt_etc {
80    name: "apex_tzlookup.xml_ver8",
81    src: "android/tzlookup.xml",
82    filename: "tzlookup.xml",
83    sub_dir: "tz/versioned/8",
84    installable: false,
85}
86
87prebuilt_etc {
88    name: "apex_telephonylookup.xml_ver8",
89    src: "android/telephonylookup.xml",
90    filename: "telephonylookup.xml",
91    sub_dir: "tz/versioned/8",
92    installable: false,
93}
94
95prebuilt_etc {
96    name: "apex_icu_res_files_ver8",
97    srcs: [
98        "icu_overlay/zoneinfo64.res",
99        "icu_overlay/metaZones.res",
100        "icu_overlay/timezoneTypes.res",
101        "icu_overlay/windowsZones.res",
102    ],
103    licenses: ["system_timezone_output_data_icu_licence"],
104    sub_dir: "tz/versioned/8/icu",
105    installable: false,
106}
107
108// tzdata packaged into a jar for use in robolectric
109java_genrule_host {
110    name: "robolectric_tzdata",
111    out: ["robolectric_tzdata.jar"],
112    tools: ["soong_zip"],
113    srcs: [
114        "iana/tzdata",
115        "android/tzlookup.xml",
116        "android/telephonylookup.xml",
117    ],
118    cmd: "mkdir -p $(genDir)/usr/share/zoneinfo/ && " +
119        "cp $(location iana/tzdata) $(genDir)/usr/share/zoneinfo/ && " +
120        "cp $(location android/tzlookup.xml) $(genDir)/usr/share/zoneinfo/ && " +
121        "cp $(location android/telephonylookup.xml) $(genDir)/usr/share/zoneinfo/ && " +
122        "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/usr/share/zoneinfo",
123}
124