• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2019 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    default_applicable_licenses: ["system_timezone_output_data_iana_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'filegroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32// http://go/android-license-faq
33license {
34    name: "system_timezone_output_data_iana_license",
35    visibility: [":__subpackages__"],
36    license_kinds: [
37        "SPDX-license-identifier-BSD",
38        "legacy_unencumbered",
39    ],
40    license_text: [
41        "NOTICE",
42    ],
43}
44
45// Build rules related to the tzdata file.
46// tzdata is a binary file used by bionic functions like mktime / localtime and
47// Android's implementation of java.util.TimeZone, ZoneInfoDb. Both these users
48// look for the file in multiple locations. Also see the com.android.tzdata
49// APEX definition.
50
51// The on-device version of the tzdata file in /system/usr/share/zoneinfo/
52// This is the ultimate fallback for bionic for situations where the
53// tzdata APEX is not mounted. For example, bionic in initd. It is also
54// referenced by old copies of bionic that may be statically linked
55// via the NDK. It is no longer used by ZoneInfoDb.
56prebuilt_usr_share {
57    name: "tzdata",
58    src: "tzdata",
59    sub_dir: "zoneinfo",
60}
61
62// The host version of the tzdata file equivalent to the definition above.
63// Used by bionic on host; bionic is being increasingly used on host for tooling.
64prebuilt_usr_share_host {
65    name: "tzdata_host",
66    src: "tzdata",
67    filename_from_src: true,
68    sub_dir: "zoneinfo",
69    target: {
70        darwin: {
71            enabled: false,
72        },
73    },
74}
75
76// Module definition producing a tzdata prebuilt file in
77// /system/etc/tzdata_module/etc/tz for standalone ART testing purposes.
78// This is a temporary change needed until the ART Buildbot and Golem both
79// fully support the Runtime APEX (see b/121117762). This module should never
80// be shipped by default (i.e. should never be part of `PRODUCT_PACKAGE`.)
81
82// TODO(b/121117762, b/129332183): Remove this module definition when
83// the ART Buildbot and Golem have full support for the Time Zone Data APEX.
84prebuilt_etc {
85    name: "tzdata-art-test-tzdata",
86    src: "tzdata",
87    filename_from_src: true,
88    sub_dir: "tzdata_module/etc/tz",
89}
90