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 // A large-scale-change added 'default_applicable_licenses' to import 18 // the below license kinds from "system_timezone_license": 19 // SPDX-license-identifier-BSD 20 // SPDX-license-identifier-MIT 21 // SPDX-license-identifier-Unicode-DFS 22 default_applicable_licenses: ["system_timezone_license"], 23} 24 25prebuilt_etc { 26 name: "apex_tz_version", 27 src: "version/tz_version", 28 filename: "tz_version", 29 sub_dir: "tz", 30 installable: false, 31} 32 33prebuilt_etc { 34 name: "apex_tzlookup.xml", 35 src: "android/tzlookup.xml", 36 filename: "tzlookup.xml", 37 sub_dir: "tz", 38 installable: false, 39} 40 41prebuilt_etc { 42 name: "apex_telephonylookup.xml", 43 src: "android/telephonylookup.xml", 44 filename: "telephonylookup.xml", 45 sub_dir: "tz", 46 installable: false, 47} 48 49prebuilt_etc { 50 name: "apex_tzdata", 51 src: "iana/tzdata", 52 notice: "iana/NOTICE", 53 filename: "tzdata", 54 sub_dir: "tz", 55 installable: false, 56} 57 58prebuilt_etc { 59 name: "apex_icu_tzdata.dat", 60 src: "icu_overlay/icu_tzdata.dat", 61 notice: "icu_overlay/LICENSE", 62 filename: "icu_tzdata.dat", 63 sub_dir: "icu", 64 installable: false, 65} 66 67// tzdata packaged into a jar for use in robolectric 68java_genrule_host { 69 name: "robolectric_tzdata", 70 out: ["robolectric_tzdata.jar"], 71 tools: ["soong_zip"], 72 srcs: [ 73 "iana/tzdata", 74 "android/tzlookup.xml", 75 "android/telephonylookup.xml", 76 ], 77 cmd: "mkdir -p $(genDir)/usr/share/zoneinfo/ && " + 78 "cp $(location iana/tzdata) $(genDir)/usr/share/zoneinfo/ && " + 79 "cp $(location android/tzlookup.xml) $(genDir)/usr/share/zoneinfo/ && " + 80 "cp $(location android/telephonylookup.xml) $(genDir)/usr/share/zoneinfo/ && " + 81 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/usr/share/zoneinfo", 82} 83