• 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-DFS",
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_tzlookup.xml",
55    src: "android/tzlookup.xml",
56    filename: "tzlookup.xml",
57    sub_dir: "tz",
58    installable: false,
59}
60
61prebuilt_etc {
62    name: "apex_telephonylookup.xml",
63    src: "android/telephonylookup.xml",
64    filename: "telephonylookup.xml",
65    sub_dir: "tz",
66    installable: false,
67}
68
69prebuilt_etc {
70    name: "apex_tzdata",
71    src: "iana/tzdata",
72    licenses: ["system_timezone_output_data_iana_licence"],
73    filename: "tzdata",
74    sub_dir: "tz",
75    installable: false,
76}
77
78prebuilt_etc {
79    name: "apex_icu_tzdata.dat",
80    src: "icu_overlay/icu_tzdata.dat",
81    licenses: ["system_timezone_output_data_icu_licence"],
82    filename: "icu_tzdata.dat",
83    sub_dir: "icu",
84    installable: false,
85}
86
87// tzdata packaged into a jar for use in robolectric
88java_genrule_host {
89    name: "robolectric_tzdata",
90    out: ["robolectric_tzdata.jar"],
91    tools: ["soong_zip"],
92    srcs: [
93        "iana/tzdata",
94        "android/tzlookup.xml",
95        "android/telephonylookup.xml",
96    ],
97    cmd: "mkdir -p $(genDir)/usr/share/zoneinfo/ && " +
98        "cp $(location iana/tzdata) $(genDir)/usr/share/zoneinfo/ && " +
99        "cp $(location android/tzlookup.xml) $(genDir)/usr/share/zoneinfo/ && " +
100        "cp $(location android/telephonylookup.xml) $(genDir)/usr/share/zoneinfo/ && " +
101        "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/usr/share/zoneinfo",
102}
103