• 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        "legacy_unencumbered",
38    ],
39    license_text: [
40        "NOTICE",
41    ],
42}
43
44// Build rules related to the tzdata file.
45// tzdata is a binary file used by bionic functions like mktime / localtime and
46// Android's implementation of java.util.TimeZone, ZoneInfoDb. Both these users
47// look for the file in multiple locations. Also see the com.android.tzdata
48// APEX definition.
49
50// The on-device version of the tzdata file in /system/usr/share/zoneinfo/
51// This is the ultimate fallback for bionic for situations where the
52// tzdata APEX is not mounted. For example, bionic in initd. It is also
53// referenced by old copies of bionic that may be statically linked
54// via the NDK. It is no longer used by ZoneInfoDb.
55prebuilt_usr_share {
56    name: "tzdata",
57    src: "tzdata",
58    sub_dir: "zoneinfo",
59}
60
61// The host version of the tzdata file equivalent to the definition above.
62// Used by bionic on host; bionic is being increasingly used on host for tooling.
63prebuilt_usr_share_host {
64    name: "tzdata_host",
65    src: "tzdata",
66    filename_from_src: true,
67    sub_dir: "zoneinfo",
68    target: {
69        darwin: {
70            enabled: false,
71        },
72    },
73}
74
75// Module definition producing a tzdata prebuilt file in
76// /system/etc/tzdata_module/etc/tz for standalone ART testing purposes.
77// This is a temporary change needed until the ART Buildbot and Golem both
78// fully support the Runtime APEX (see b/121117762). This module should never
79// be shipped by default (i.e. should never be part of `PRODUCT_PACKAGE`.)
80
81// TODO(b/121117762, b/129332183): Remove this module definition when
82// the ART Buildbot and Golem have full support for the Time Zone Data APEX.
83prebuilt_etc {
84    name: "tzdata-art-test-tzdata",
85    src: "tzdata",
86    filename_from_src: true,
87    sub_dir: "tzdata_module/etc/tz",
88}
89