Neil Fuller | b27c437 | 2018-10-29 17:36:55 +0000 | [diff] [blame] | 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 | |
| 15 | prebuilt_etc { |
| 16 | name: "apex_tz_version", |
| 17 | src: "version/tz_version", |
| 18 | filename: "tz_version", |
Neil Fuller | 0d1994c | 2018-12-06 14:21:03 +0000 | [diff] [blame] | 19 | sub_dir: "tz", |
Neil Fuller | b27c437 | 2018-10-29 17:36:55 +0000 | [diff] [blame] | 20 | installable: false, |
| 21 | } |
| 22 | |
| 23 | prebuilt_etc { |
| 24 | name: "apex_tzlookup.xml", |
| 25 | src: "android/tzlookup.xml", |
| 26 | filename: "tzlookup.xml", |
Neil Fuller | 0d1994c | 2018-12-06 14:21:03 +0000 | [diff] [blame] | 27 | sub_dir: "tz", |
Neil Fuller | b27c437 | 2018-10-29 17:36:55 +0000 | [diff] [blame] | 28 | installable: false, |
| 29 | } |
| 30 | |
| 31 | prebuilt_etc { |
Neil Fuller | f85e814 | 2019-10-28 17:21:55 +0000 | [diff] [blame] | 32 | name: "apex_telephonylookup.xml", |
| 33 | src: "android/telephonylookup.xml", |
| 34 | filename: "telephonylookup.xml", |
| 35 | sub_dir: "tz", |
| 36 | installable: false, |
| 37 | } |
| 38 | |
| 39 | prebuilt_etc { |
Neil Fuller | b27c437 | 2018-10-29 17:36:55 +0000 | [diff] [blame] | 40 | name: "apex_tzdata", |
| 41 | src: "iana/tzdata", |
| 42 | notice: "iana/NOTICE", |
| 43 | filename: "tzdata", |
Neil Fuller | 0d1994c | 2018-12-06 14:21:03 +0000 | [diff] [blame] | 44 | sub_dir: "tz", |
Neil Fuller | b27c437 | 2018-10-29 17:36:55 +0000 | [diff] [blame] | 45 | installable: false, |
| 46 | } |
| 47 | |
| 48 | prebuilt_etc { |
| 49 | name: "apex_icu_tzdata.dat", |
| 50 | src: "icu_overlay/icu_tzdata.dat", |
Neil Fuller | 64bd411 | 2018-11-01 18:14:07 +0000 | [diff] [blame] | 51 | notice: "icu_overlay/LICENSE", |
Neil Fuller | b27c437 | 2018-10-29 17:36:55 +0000 | [diff] [blame] | 52 | filename: "icu_tzdata.dat", |
Neil Fuller | 3ac96de | 2018-12-04 20:31:03 +0000 | [diff] [blame] | 53 | sub_dir: "icu", |
Neil Fuller | b27c437 | 2018-10-29 17:36:55 +0000 | [diff] [blame] | 54 | installable: false, |
| 55 | } |
| 56 | |
Colin Cross | 9771828 | 2019-04-02 23:00:34 -0700 | [diff] [blame] | 57 | // tzdata packaged into a jar for use in robolectric |
| 58 | java_genrule { |
| 59 | name: "robolectric_tzdata", |
| 60 | out: ["robolectric_tzdata.jar"], |
| 61 | tools: ["soong_zip"], |
| 62 | srcs: [ |
| 63 | "iana/tzdata", |
| 64 | "android/tzlookup.xml", |
Neil Fuller | f85e814 | 2019-10-28 17:21:55 +0000 | [diff] [blame] | 65 | "android/telephonylookup.xml", |
Colin Cross | 9771828 | 2019-04-02 23:00:34 -0700 | [diff] [blame] | 66 | ], |
| 67 | cmd: "mkdir -p $(genDir)/usr/share/zoneinfo/ && " + |
| 68 | "cp $(location iana/tzdata) $(genDir)/usr/share/zoneinfo/ && " + |
| 69 | "cp $(location android/tzlookup.xml) $(genDir)/usr/share/zoneinfo/ && " + |
Neil Fuller | f85e814 | 2019-10-28 17:21:55 +0000 | [diff] [blame] | 70 | "cp $(location android/telephonylookup.xml) $(genDir)/usr/share/zoneinfo/ && " + |
Colin Cross | 9771828 | 2019-04-02 23:00:34 -0700 | [diff] [blame] | 71 | "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/usr/share/zoneinfo", |
| 72 | } |