• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: "versioned/8/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
108prebuilt_etc {
109    name: "apex_tz_version_ver9",
110    src: "version/tz_version",
111    filename: "tz_version",
112    sub_dir: "tz/versioned/9",
113    installable: false,
114}
115
116prebuilt_etc {
117    name: "apex_tzdata_ver9",
118    src: "iana/tzdata",
119    licenses: ["system_timezone_output_data_iana_licence"],
120    filename: "tzdata",
121    sub_dir: "tz/versioned/9",
122    installable: false,
123}
124
125prebuilt_etc {
126    name: "apex_tzlookup.xml_ver9",
127    src: "android/tzlookup.xml",
128    filename: "tzlookup.xml",
129    sub_dir: "tz/versioned/9",
130    installable: false,
131}
132
133prebuilt_etc {
134    name: "apex_telephonylookup.xml_ver9",
135    src: "android/telephonylookup.xml",
136    filename: "telephonylookup.xml",
137    sub_dir: "tz/versioned/9",
138    installable: false,
139}
140
141prebuilt_etc {
142    name: "apex_icu_res_files_ver9",
143    srcs: [
144        "icu_overlay/zoneinfo64.res",
145        "icu_overlay/metaZones.res",
146        "icu_overlay/timezoneTypes.res",
147        "icu_overlay/windowsZones.res",
148    ],
149    licenses: ["system_timezone_output_data_icu_licence"],
150    sub_dir: "tz/versioned/9/icu",
151    installable: false,
152}
153
154// tzdata packaged into a jar for use in robolectric
155java_genrule_host {
156    name: "robolectric_tzdata",
157    out: ["robolectric_tzdata.jar"],
158    tools: ["soong_zip"],
159    srcs: [
160        "iana/tzdata",
161        "android/tzlookup.xml",
162        "android/telephonylookup.xml",
163    ],
164    cmd: "mkdir -p $(genDir)/usr/share/zoneinfo/ && " +
165        "cp $(location iana/tzdata) $(genDir)/usr/share/zoneinfo/ && " +
166        "cp $(location android/tzlookup.xml) $(genDir)/usr/share/zoneinfo/ && " +
167        "cp $(location android/telephonylookup.xml) $(genDir)/usr/share/zoneinfo/ && " +
168        "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/usr/share/zoneinfo",
169}
170