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 notice: "iana/NOTICE", 74 filename: "tzdata", 75 sub_dir: "tz", 76 installable: false, 77} 78 79prebuilt_etc { 80 name: "apex_icu_tzdata.dat", 81 src: "icu_overlay/icu_tzdata.dat", 82 licenses: ["system_timezone_output_data_icu_licence"], 83 notice: "icu_overlay/LICENSE", 84 filename: "icu_tzdata.dat", 85 sub_dir: "icu", 86 installable: false, 87} 88 89// tzdata packaged into a jar for use in robolectric 90java_genrule_host { 91 name: "robolectric_tzdata", 92 out: ["robolectric_tzdata.jar"], 93 tools: ["soong_zip"], 94 srcs: [ 95 "iana/tzdata", 96 "android/tzlookup.xml", 97 "android/telephonylookup.xml", 98 ], 99 cmd: "mkdir -p $(genDir)/usr/share/zoneinfo/ && " + 100 "cp $(location iana/tzdata) $(genDir)/usr/share/zoneinfo/ && " + 101 "cp $(location android/tzlookup.xml) $(genDir)/usr/share/zoneinfo/ && " + 102 "cp $(location android/telephonylookup.xml) $(genDir)/usr/share/zoneinfo/ && " + 103 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/usr/share/zoneinfo", 104} 105