blob: bbb8c27e5058190882512673dfe182d4d966cb15 [file] [log] [blame]
Colin Crossaf0b54c2017-09-27 17:22:32 -07001// Copyright (C) 2007 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//
Neil Fuller77e3f3b2018-10-19 10:22:32 +010016// Definitions for building the Android core library and associated tests.
Colin Crossaf0b54c2017-09-27 17:22:32 -070017//
18
Neil Fuller77e3f3b2018-10-19 10:22:32 +010019// The Android core library provides low-level APIs for use by the rest of the
20// Android software stack. It is made up of various parts, some of which can be
21// found in libcore/ and other parts that can be found in various external/
Paul Duffinfb46f732019-09-25 16:04:21 +010022// directories.
23//
Neil Fullercf756882018-08-28 18:42:22 +010024// libcore has some sub-directories that follow a common structure:
25// e.g. dalvik, dom, harmony-tests, json, jsr166-tests, luni, libart, ojluni,
26// support, xml, xmlpull.
Colin Crossaf0b54c2017-09-27 17:22:32 -070027//
Neil Fullercf756882018-08-28 18:42:22 +010028// The structure of these is generally:
Colin Crossaf0b54c2017-09-27 17:22:32 -070029//
30// src/
31// main/ # To be shipped on every device.
32// java/ # Java source for library code.
Neil Fullercf756882018-08-28 18:42:22 +010033// native/ # C/C++ source for library code.
Colin Crossaf0b54c2017-09-27 17:22:32 -070034// resources/ # Support files.
35// test/ # Built only on demand, for testing.
36// java/ # Java source for tests.
Neil Fullercf756882018-08-28 18:42:22 +010037// native/ # C/C++ source for tests (rare).
Colin Crossaf0b54c2017-09-27 17:22:32 -070038// resources/ # Support files.
39//
Neil Fullercf756882018-08-28 18:42:22 +010040// All subdirectories are optional.
Colin Crossaf0b54c2017-09-27 17:22:32 -070041
42build = [
43 "openjdk_java_files.bp",
44 "non_openjdk_java_files.bp",
45]
46
47// The Java files and their associated resources.
Tobias Thierer79eea262019-08-01 14:05:11 +010048filegroup {
49 name: "core-luni-resources",
50 visibility: [
51 "//libcore:__subpackages__",
52 ],
53 path: "luni/src/main/java/",
54 srcs: [
Tobias Thierer79eea262019-08-01 14:05:11 +010055 "luni/src/main/java/java/util/logging/logging.properties",
56 "luni/src/main/java/java/security/security.properties",
57 ],
58}
59
60filegroup {
61 name: "core-ojluni-resources",
62 visibility: [
63 "//libcore:__subpackages__",
64 ],
65 path: "ojluni/src/main/resources/",
66 srcs: [
67 "ojluni/src/main/resources/**/*",
68 ],
69}
70
71core_resources = [
72 ":core-luni-resources",
73 ":core-ojluni-resources",
Colin Crossaf0b54c2017-09-27 17:22:32 -070074]
75
Neil Fuller866ed4a2018-09-06 12:05:46 +010076// The source files that go into core-oj.
77filegroup {
78 name: "core_oj_java_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +010079 visibility: [
80 "//libcore:__subpackages__",
81 ],
Neil Fuller866ed4a2018-09-06 12:05:46 +010082 srcs: [":openjdk_java_files"],
83}
84
Neil Fullere32e2e12019-02-26 11:48:30 +000085// OpenJDK source is not annotated with @hide so we need this separate
Neil Fuller866ed4a2018-09-06 12:05:46 +010086// filegroup for just the parts that contribute to the API.
87filegroup {
88 name: "core_oj_api_files",
89 srcs: [":openjdk_javadoc_files"],
90}
91
92// The source files that go into core-libart.
93filegroup {
94 name: "core_libart_java_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +010095 visibility: [
96 "//libcore:__subpackages__",
97 ],
Neil Fuller866ed4a2018-09-06 12:05:46 +010098 srcs: [
99 ":non_openjdk_java_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100100 ],
101}
102
Neil Fullere32e2e12019-02-26 11:48:30 +0000103// Some parts of libart are not annotated with @hide so we need this separate
Neil Fuller866ed4a2018-09-06 12:05:46 +0100104// filegroup for just the parts that contribute to the API.
105filegroup {
106 name: "core_libart_api_files",
107 srcs: [
108 ":non_openjdk_javadoc_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100109 ],
110}
111
Neil Fullere32e2e12019-02-26 11:48:30 +0000112// The set of files for the core library that have been marked up with @hide
113// for the public SDK APIs. Used from frameworks/base/ to indicate the source
114// files for inclusion in the public SDK docs.
115filegroup {
116 name: "core_public_api_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100117 visibility: [
118 "//frameworks/base",
119 ],
Neil Fullere32e2e12019-02-26 11:48:30 +0000120 srcs: [
Victor Changcad47af2019-08-06 16:33:38 +0100121 ":android_icu4j_src_files",
Neil Fullere32e2e12019-02-26 11:48:30 +0000122 ":core_oj_api_files",
123 ":core_libart_api_files",
124 ":conscrypt_public_api_files",
125 ],
126}
127
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100128// The set of files for the core library that have been marked up with @hide and
129// API-related annotations. Note that this includes the intra-core and
130// core-platform APIs as well as the public APIs.
131//
Neil Fullere32e2e12019-02-26 11:48:30 +0000132// Some source files in :core_oj_api_files and :openjdk_mmodule_extra_files are
133// annotated by applying annotations to the .annotated.java stubs files in
134// ojluni/annotated/mmodules and rather than in the original source. See the comments
135// in openjdk_java_files.bp for more details.
Neil Fuller866ed4a2018-09-06 12:05:46 +0100136filegroup {
137 name: "core_api_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100138 visibility: [
139 "//libcore:__subpackages__",
140 ],
Neil Fuller866ed4a2018-09-06 12:05:46 +0100141 srcs: [
Victor Changcad47af2019-08-06 16:33:38 +0100142 ":android_icu4j_src_files",
Neil Fullerd129bc92018-09-26 11:12:58 +0100143 ":apache-xml_api_files",
Neil Fullera77f7102018-09-21 19:04:41 +0100144 ":bouncycastle_java_files",
Neil Fuller603e1a72018-09-25 11:55:41 +0100145 ":conscrypt_java_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100146 ":core_oj_api_files",
147 ":core_libart_api_files",
Neil Fuller641d5f92018-09-24 15:40:39 +0100148 ":okhttp_api_files",
Pete Gillinc9935b62018-09-25 14:42:40 +0100149 ":openjdk_mmodule_extra_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100150 ],
151}
152
Colin Crossaf0b54c2017-09-27 17:22:32 -0700153java_defaults {
154 name: "libcore_java_defaults",
155 javacflags: [
156 //"-Xlint:all",
157 //"-Xlint:-serial,-deprecation,-unchecked",
158 ],
159 dxflags: ["--core-library"],
Andreas Gampe66b31732018-02-20 09:22:16 -0800160 errorprone: {
161 javacflags: [
Paul Duffinc31f6bb2019-05-15 12:32:44 +0100162 "-Xep:MissingOverride:OFF", // Ignore missing @Override.
163 "-Xep:ConstantOverflow:WARN", // Known constant overflow in SplittableRandom
Andreas Gampe66b31732018-02-20 09:22:16 -0800164 ],
165 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700166}
167
168//
169// Build for the target (device).
170//
171
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100172// Visibility of core-all* build modules; we restrict visibility of core-all deliberately to
173// a small set of build modules that the core library team control. See core-all-system-modules
174// for more details.
175core_all_visibility = [
176 "//external/apache-harmony:__subpackages__",
177 "//external/apache-xml",
178 "//external/bouncycastle",
179 "//external/conscrypt",
180 "//external/icu/android_icu4j",
181 "//external/okhttp",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100182 "//libcore:__subpackages__",
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100183]
184
Tobias Thierer52331642019-05-29 12:11:39 +0000185// A target used to bootstrap compilation for the core library.
186// See core-all-system-modules for more details.
187java_library {
188 name: "core-all",
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100189 visibility: core_all_visibility,
Tobias Thierer52331642019-05-29 12:11:39 +0000190 defaults: ["libcore_java_defaults"],
Colin Crossaf0b54c2017-09-27 17:22:32 -0700191
192 srcs: [
Victor Changcad47af2019-08-06 16:33:38 +0100193 ":android_icu4j_src_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100194 ":core_oj_java_files",
195 ":core_libart_java_files",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700196 ":openjdk_lambda_stub_files",
Pete Gillin54035812019-05-08 15:09:39 +0100197 ":openjdk_generated_annotation_stub_files",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700198 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700199
Paul Duffin83c25382019-06-07 14:10:49 +0100200 sdk_version: "none",
Colin Crossec80f4f2018-08-15 21:17:11 -0700201 system_modules: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700202 openjdk9: {
203 srcs: ["luni/src/module/java/module-info.java"],
204 javacflags: ["--patch-module=java.base=."],
205 },
Colin Crossec80f4f2018-08-15 21:17:11 -0700206
Tobias Thierer79eea262019-08-01 14:05:11 +0100207 java_resources: core_resources,
Victor Chang7fef4052018-09-25 14:12:03 +0100208 static_libs: ["android_icu4j_resources_lib"],
Tobias Thiererde991232018-03-07 15:10:46 +0000209 java_version: "1.9",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700210
Colin Crossaf0b54c2017-09-27 17:22:32 -0700211 installable: false,
atrost98ec08d2019-08-05 12:23:41 +0100212
213 plugins: ["compat-changeid-annotation-processor"],
214}
215
216platform_compat_config {
217 name: "libcore-platform-compat-config",
atrost98ec08d2019-08-05 12:23:41 +0100218 src: ":core-all",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700219}
220
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100221// A system modules definition for use by core library targets only. It only
222// contains the core-all jar, which contains the classes that end up in core-oj,
223// core-libart as well as the lambda stubs needed to compile Java lambda code.
224// It does not contain other parts of core library like conscrypt, bouncycastle,
225// etc. This system_modules definition is used to bootstrap compilation for
Victor Changcad47af2019-08-06 16:33:38 +0100226// other parts of the core library like core-oj, core-libart, core-icu4j, conscrypt,
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100227// bouncycastle, etc.
Colin Crossa4d9fc42017-09-29 18:04:37 -0700228java_system_modules {
229 name: "core-all-system-modules",
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100230 visibility: core_all_visibility,
Colin Crossa4d9fc42017-09-29 18:04:37 -0700231 libs: ["core-all"],
232}
233
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100234// Contains the parts of core library associated with OpenJDK.
Colin Crossaf0b54c2017-09-27 17:22:32 -0700235java_library {
236 name: "core-oj",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000237 visibility: [
238 "//art/build/apex",
239 "//external/wycheproof",
Paul Duffin94f70232019-05-22 16:22:29 +0100240 "//libcore/benchmarks",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000241 ],
Colin Crossaf0b54c2017-09-27 17:22:32 -0700242 defaults: ["libcore_java_defaults"],
Colin Cross5b75cdd2018-06-27 11:00:13 -0700243 installable: true,
Colin Crossbb180be2017-10-09 14:54:53 -0700244 hostdex: true,
Colin Crossaf0b54c2017-09-27 17:22:32 -0700245
Neil Fuller866ed4a2018-09-06 12:05:46 +0100246 srcs: [":core_oj_java_files"],
Tobias Thierer79eea262019-08-01 14:05:11 +0100247 java_resources: core_resources,
Colin Crossec80f4f2018-08-15 21:17:11 -0700248
Paul Duffin83c25382019-06-07 14:10:49 +0100249 sdk_version: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700250 system_modules: "core-all-system-modules",
251 openjdk9: {
252 javacflags: ["--patch-module=java.base=."],
253 },
Colin Crossec80f4f2018-08-15 21:17:11 -0700254
Pete Gillin7a7a6d22017-12-19 14:56:03 +0000255 jacoco: {
Pete Gillin27ca0582018-01-10 17:04:17 +0000256 exclude_filter: [
Pete Gillin3f59bad2018-01-30 11:20:29 +0000257 "java.lang.Class",
258 "java.lang.Long",
259 "java.lang.Number",
260 "java.lang.Object",
261 "java.lang.String",
262 "java.lang.invoke.MethodHandle",
263 "java.lang.ref.Reference",
264 "java.lang.reflect.Proxy",
Pete Gillinb1868ada2018-01-17 11:03:10 +0000265 "java.util.AbstractMap",
Pete Gillin3f59bad2018-01-30 11:20:29 +0000266 "java.util.HashMap",
267 "java.util.HashMap$Node",
Pete Gillinb1868ada2018-01-17 11:03:10 +0000268 "java.util.Map",
Pete Gillin7a7a6d22017-12-19 14:56:03 +0000269 ],
270 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700271
272 notice: "ojluni/NOTICE",
273
Colin Crossaf0b54c2017-09-27 17:22:32 -0700274}
275
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100276// Contains parts of core library not associated with OpenJDK. Contains not
Victor Changcad47af2019-08-06 16:33:38 +0100277// just java.*, javax.* code but also android.system.* and various internal
278// libcore.* packages.
Colin Crossaf0b54c2017-09-27 17:22:32 -0700279java_library {
280 name: "core-libart",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000281 visibility: [
282 "//art/build/apex",
283 "//external/robolectric-shadows",
284 "//external/wycheproof",
Paul Duffin94f70232019-05-22 16:22:29 +0100285 "//libcore/benchmarks",
Colin Crossf0ef6252019-05-31 08:26:47 -0700286 "//frameworks/layoutlib",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000287 ],
Colin Crossaf0b54c2017-09-27 17:22:32 -0700288 defaults: ["libcore_java_defaults"],
Colin Cross5b75cdd2018-06-27 11:00:13 -0700289 installable: true,
Colin Crossbb180be2017-10-09 14:54:53 -0700290 hostdex: true,
Colin Crossaf0b54c2017-09-27 17:22:32 -0700291
Neil Fuller866ed4a2018-09-06 12:05:46 +0100292 srcs: [":core_libart_java_files"],
Tobias Thiererde991232018-03-07 15:10:46 +0000293 java_version: "1.9",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700294
Paul Duffin83c25382019-06-07 14:10:49 +0100295 sdk_version: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700296 system_modules: "core-all-system-modules",
297 openjdk9: {
298 javacflags: ["--patch-module=java.base=."],
299 },
Colin Crossec80f4f2018-08-15 21:17:11 -0700300
Pete Gillin80ebe872018-02-13 15:21:20 +0000301 jacoco: {
302 exclude_filter: [
303 "java.lang.DexCache",
304 "dalvik.system.ClassExt",
305 ],
306 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700307
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700308 target: {
309 hostdex: {
310 required: [
Neil Fuller53c5f032019-06-05 13:47:39 +0100311 // Files used to simulate the /system, runtime APEX and tzdata
312 // APEX dir structure on host.
313 "icu_tzdata.dat_host_tzdata_apex",
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700314 "tzdata_host",
Neil Fuller53c5f032019-06-05 13:47:39 +0100315 "tzdata_host_tzdata_apex",
Neil Fuller53c5f032019-06-05 13:47:39 +0100316 "tzlookup.xml_host_tzdata_apex",
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700317 "tz_version_host",
Neil Fuller53c5f032019-06-05 13:47:39 +0100318 "tz_version_host_tzdata_apex",
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700319 ],
320 },
321 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700322}
323
Victor Changb28d3f82019-08-09 16:24:46 +0100324// A separated core library that contains ICU4J because ICU4J will be in a different APEX module,
325// not in Runtime module.
Victor Changcad47af2019-08-06 16:33:38 +0100326java_library {
327 name: "core-icu4j",
328 visibility: [
329 "//art/build/apex",
330 "//external/robolectric-shadows",
331 "//frameworks/layoutlib",
332 ],
333 defaults: ["libcore_java_defaults"],
334 installable: true,
335 hostdex: true,
336
337 srcs: [":android_icu4j_src_files"],
Victor Changb28d3f82019-08-09 16:24:46 +0100338 libs: ["libcore-unsupportedappusage-annotation"],
339 static_libs: ["android_icu4j_resources_lib_sdk_core_current"],
Victor Changcad47af2019-08-06 16:33:38 +0100340
Paul Duffina8bb6062019-09-25 15:50:13 +0100341 // We use art-module-public-api-stubs-system-modules when compiling core-icu4j as ICU4J does not
342 // use any internal or android specific code. If it ever did then it could depend on
343 // core-intra-stubs-system-modules (a superset) instead.
344 // It is important that core-icu4j is restricted to only use stable APIs from the ART module
345 // since it is in a different APEX module that can be updated independently.
346 sdk_version: "none",
347 system_modules: "art-module-public-api-stubs-system-modules",
Victor Changcad47af2019-08-06 16:33:38 +0100348}
349
Paul Duffin7bb8d232018-10-23 11:48:38 +0100350// Provided solely to contribute information about which hidden parts of the
351// core-oj API are used by apps.
Paul Duffinc6bf27b2019-05-15 14:41:00 +0100352//
353// The build system determines that this library provides hiddenapi information
354// for the core-oj bootjar because its name is of the form <x>-hiddenapi, where
355// <x> is the name of a boot jar. That triggers the generation of a flags.csv
356// file which encapsulates information extracted from the UnsupportedAppUsage
357// annotations in the dex. The information from that file is then encoded into
358// the core-oj file.
359//
360// Usually, e.g. for core-libart, the UnsupportedAppUsage annotations are
361// added to the source that is compiled directly into the bootjar and the build
362// system extracts the information about UnsupportedAppUsage directly from
363// there.
364//
365// This approach of having separate annotated source and a separate build
366// target was taken for ojluni to avoid having to maintain local patches in the
367// ojluni source for UnsupportedAppUsage annotations as that would make it more
368// difficult to pull down changes from upstream.
369//
Paul Duffin7bb8d232018-10-23 11:48:38 +0100370java_library {
371 name: "core-oj-hiddenapi",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000372 // Do not allow this to be accessed from outside this directory.
373 visibility: ["//visibility:private"],
Paul Duffin7bb8d232018-10-23 11:48:38 +0100374 defaults: ["libcore_java_defaults"],
375 compile_dex: true,
376
377 srcs: [":openjdk_hiddenapi_javadoc_files"],
378
Paul Duffin83c25382019-06-07 14:10:49 +0100379 sdk_version: "none",
Paul Duffin7bb8d232018-10-23 11:48:38 +0100380 system_modules: "core-all-system-modules",
381 openjdk9: {
382 javacflags: ["--patch-module=java.base=."],
383 },
384}
385
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100386//
Victor Changcad47af2019-08-06 16:33:38 +0100387// Guaranteed unstripped versions of core-icu4j, core-oj and core-libart.
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100388//
Colin Cross3c6c2e22017-10-18 13:24:52 -0700389// The build system may or may not strip the core-oj and core-libart jars,
390// but these will not be stripped. See b/24535627.
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100391//
392
Colin Cross3c6c2e22017-10-18 13:24:52 -0700393java_library {
394 name: "core-oj-testdex",
Colin Cross5b75cdd2018-06-27 11:00:13 -0700395 installable: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700396 static_libs: ["core-oj"],
Paul Duffin83c25382019-06-07 14:10:49 +0100397 sdk_version: "none",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700398 system_modules: "core-all-system-modules",
399 dxflags: ["--core-library"],
Colin Cross485ed362017-12-05 17:24:22 -0800400 dex_preopt: {
401 enabled: false,
402 },
Tobias Thiererde991232018-03-07 15:10:46 +0000403 java_version: "1.9",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700404 notice: "ojluni/NOTICE",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700405}
406
407java_library {
408 name: "core-libart-testdex",
Colin Cross5b75cdd2018-06-27 11:00:13 -0700409 installable: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700410 static_libs: ["core-libart"],
Paul Duffin83c25382019-06-07 14:10:49 +0100411 sdk_version: "none",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700412 system_modules: "core-all-system-modules",
413 dxflags: ["--core-library"],
Colin Cross485ed362017-12-05 17:24:22 -0800414 dex_preopt: {
415 enabled: false,
416 },
Colin Cross3c6c2e22017-10-18 13:24:52 -0700417 notice: "ojluni/NOTICE",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700418}
419
Victor Changcad47af2019-08-06 16:33:38 +0100420java_library {
421 name: "core-icu4j-testdex",
422 installable: true,
423 static_libs: ["core-icu4j"],
424 sdk_version: "none",
Victor Changcad47af2019-08-06 16:33:38 +0100425 system_modules: "core-all-system-modules",
426 dxflags: ["--core-library"],
427 dex_preopt: {
428 enabled: false,
429 },
430}
431
Tobias Thierere0f8b312018-10-23 23:12:30 +0100432java_defaults {
433 name: "core_lambda_stubs_defaults",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700434 defaults: ["libcore_java_defaults"],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100435 hostdex: true,
Colin Crossaf0b54c2017-09-27 17:22:32 -0700436
Paul Duffin83c25382019-06-07 14:10:49 +0100437 sdk_version: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700438 system_modules: "core-all-system-modules",
439 openjdk9: {
440 javacflags: ["--patch-module=java.base=."],
441 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700442
443 notice: "ojluni/NOTICE",
444
445 installable: false,
446 include_srcs: true,
447}
Colin Crossa4d9fc42017-09-29 18:04:37 -0700448
Tobias Thierere0f8b312018-10-23 23:12:30 +0100449// Creates a jar that exists to satisfy javac when compiling source code that
450// contains lambdas. This contains all classes / methods required by javac
451// when generating invoke-dynamic lambda implementation code, even those that
452// are also in the public SDK API from API level 26 onwards.
453java_library {
454 name: "core-lambda-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100455 visibility: ["//visibility:public"],
Tobias Thierere0f8b312018-10-23 23:12:30 +0100456 defaults: ["core_lambda_stubs_defaults"],
457 srcs: [
458 ":openjdk_lambda_stub_files",
459 ":openjdk_lambda_duplicate_stub_files",
460 ],
461}
462
463// An alternative to core-lambda-stubs that omits openjdk_lambda_duplicate_stub_files
464// because those classes are also part of the core library public SDK API
465// (since API level 26).
466java_library {
467 name: "core-lambda-stubs-for-system-modules",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100468 visibility: [
469 "//libcore/mmodules/core_platform_api",
470 ],
Tobias Thierere0f8b312018-10-23 23:12:30 +0100471 defaults: ["core_lambda_stubs_defaults"],
472 srcs: [
473 ":openjdk_lambda_stub_files",
474 ],
475}
476
Pete Gillin54035812019-05-08 15:09:39 +0100477// Creates a jar that exists to satisfy javac when compiling source code that
478// contains @Generated annotations, which are produced by some code generation
479// tools (notably dagger) but aren't part of the Android API.
480// See http://b/123891440.
481java_library {
482 name: "core-generated-annotation-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100483 visibility: [
484 "//libcore/mmodules/core_platform_api",
485 ],
Pete Gillin54035812019-05-08 15:09:39 +0100486 defaults: ["libcore_java_defaults"],
487 srcs: [
488 ":openjdk_generated_annotation_stub_files",
489 ],
490 hostdex: true,
Paul Duffin83c25382019-06-07 14:10:49 +0100491 sdk_version: "none",
Pete Gillin54035812019-05-08 15:09:39 +0100492 system_modules: "core-all-system-modules",
493 openjdk9: {
494 javacflags: ["--patch-module=java.base=."],
495 },
496 notice: "ojluni/NOTICE",
497 installable: false,
498 include_srcs: true,
499}
500
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100501// Builds libcore test rules
Colin Cross3c6c2e22017-10-18 13:24:52 -0700502java_library_static {
503 name: "core-test-rules",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100504 visibility: [
Paul Duffin01f6c022019-09-24 14:44:15 +0100505 "//external/conscrypt",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100506 "//frameworks/base/location/tests/locationtests",
507 ],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700508 hostdex: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700509 srcs: [
510 "dalvik/test-rules/src/main/**/*.java",
511 "test-rules/src/main/**/*.java",
512 ],
513 static_libs: ["junit"],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100514
Paul Duffin83c25382019-06-07 14:10:49 +0100515 sdk_version: "none",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100516 system_modules: "core-all-system-modules",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700517}
518
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100519// Builds the core-tests-support library used by various tests.
Colin Cross3c6c2e22017-10-18 13:24:52 -0700520java_library_static {
521 name: "core-tests-support",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100522 visibility: [
523 "//cts/apps/CtsVerifier",
524 "//cts/tests/tests/keystore",
525 "//cts/tests/tests/net",
526 "//cts/tests/tests/net/api23Test",
527 "//external/apache-harmony",
528 "//frameworks/base/core/tests/coretests",
529 "//libcore/benchmarks",
530 "//packages/apps/KeyChain/tests",
531 "//system/timezone/distro/core",
532 ],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700533 hostdex: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700534 srcs: ["support/src/test/java/**/*.java"],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100535
Paul Duffin53c491f2019-06-12 13:48:14 +0100536 sdk_version: "core_platform",
Neil Fuller4380ab22018-10-18 19:38:53 +0100537 libs: ["junit"],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700538 static_libs: [
Neil Fullerde8b0862018-10-12 21:53:31 +0100539 "bouncycastle-unbundled",
540 "bouncycastle-bcpkix-unbundled",
541 "bouncycastle-ocsp-unbundled",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700542 ],
543}
544
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100545// Builds the jsr166-tests library.
Colin Crossec80f4f2018-08-15 21:17:11 -0700546java_test {
Colin Cross3c6c2e22017-10-18 13:24:52 -0700547 name: "jsr166-tests",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100548 visibility: [
549 "//cts/tests/libcore/jsr166",
550 ],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700551 srcs: ["jsr166-tests/src/test/java/**/*.java"],
Paul Duffin83c25382019-06-07 14:10:49 +0100552 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100553 system_modules: "core-all-system-modules",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700554 libs: [
555 "junit",
556 ],
557}
Nan Zhang65f27a32018-01-05 10:41:46 -0800558
Pete Gillinec902b82019-06-26 17:23:00 +0100559// A filegroup that provides access to a source file for a toolchain test that
560// checks Java 9 language features are handled properly by JarJar.
561filegroup {
562 name: "core-java-9-language-features-source",
563 srcs: ["luni/src/main/java/libcore/internal/Java9LanguageFeatures.java"],
564 visibility: ["//libcore/luni/src/test/java9language"],
565}
566
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100567// Builds the core-tests library.
Colin Crossec80f4f2018-08-15 21:17:11 -0700568java_test {
569 name: "core-tests",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100570 visibility: [
571 "//cts/tests/libcore/luni",
572 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700573 defaults: ["libcore_java_defaults"],
574 hostdex: true,
575 srcs: [
576 "dalvik/src/test/java/**/*.java",
577 "dalvik/test-rules/src/test/java/**/*.java",
578 "dom/src/test/java/**/*.java",
579 "harmony-tests/src/test/java/**/*.java",
580 "json/src/test/java/**/*.java",
581 "luni/src/test/java/**/*.java",
Paul Duffin4ba14532019-03-21 10:32:41 +0000582 "test-rules/src/test/java/**/*.java",
Colin Crossec80f4f2018-08-15 21:17:11 -0700583 "xml/src/test/java/**/*.java",
584 ],
585 exclude_srcs: [
586 "luni/src/test/java/libcore/java/util/zip/Zip64Test.java",
587 "luni/src/test/java/libcore/java/util/zip/Zip64FileTest.java",
588 ],
589
590 java_resource_dirs: [
591 "*/src/test/java",
592 "*/src/test/resources",
593 ],
594 exclude_java_resource_dirs: [
595 "ojluni/src/test/java",
596 "ojluni/src/test/resources",
597 ],
598
599 java_resources: [
Paul Duffin16a057f2019-05-13 12:20:55 +0100600 ":annotations-test",
Colin Crossec80f4f2018-08-15 21:17:11 -0700601 ":filesystemstest",
602 ":parameter-metadata-test",
603 ],
604
Paul Duffin83c25382019-06-07 14:10:49 +0100605 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100606 system_modules: "core-all-system-modules",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100607 libs: [
Neil Fuller4207c7f2018-10-10 14:01:40 +0100608 "okhttp",
609 "bouncycastle",
610 ],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100611
Colin Crossec80f4f2018-08-15 21:17:11 -0700612 static_libs: [
613 "archive-patcher",
Pete Gillin05a43202019-06-27 14:41:21 +0100614 "core-java-9-language-tests",
Colin Crossec80f4f2018-08-15 21:17:11 -0700615 "core-test-rules",
616 "core-tests-support",
617 "junit-params",
618 "mockftpserver",
619 "mockito-target",
620 "mockwebserver",
621 "nist-pkix-tests",
622 "slf4j-jdk14",
623 "sqlite-jdbc",
624 "tzdata-testing",
Paul Duffina4df2372018-12-10 15:48:01 +0000625 "truth-prebuilt",
Colin Crossec80f4f2018-08-15 21:17:11 -0700626 ],
627
628 errorprone: {
629 javacflags: [
630 "-Xep:TryFailThrowable:ERROR",
631 "-Xep:ComparisonOutOfRange:ERROR",
632 ],
633 },
Simran Basi3be01e02018-08-21 17:53:49 -0700634
635 test_config: "AndroidTest-core-tests.xml",
Colin Crossec80f4f2018-08-15 21:17:11 -0700636}
637
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100638// Builds the core-ojtests library that contains test code from OpenJDK.
Colin Crossec80f4f2018-08-15 21:17:11 -0700639java_test {
640 name: "core-ojtests",
641 defaults: ["libcore_java_defaults"],
642 hostdex: true,
643
644 srcs: [
645 "ojluni/src/test/java/**/*.java",
646 ],
647 java_resource_dirs: [
648 "ojluni/src/test/java",
649 "ojluni/src/test/resources",
650 ],
Neil Fullerb669ccb2018-10-04 23:10:27 +0100651
Paul Duffin83c25382019-06-07 14:10:49 +0100652 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100653 system_modules: "core-all-system-modules",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100654 libs: [
Neil Fuller4207c7f2018-10-10 14:01:40 +0100655 "okhttp",
656 "bouncycastle",
657 ],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100658
Colin Crossec80f4f2018-08-15 21:17:11 -0700659 static_libs: ["testng"],
660
661 // ojluni/src/test/java/util/stream/{bootlib,boottest}
662 // contains tests that are in packages from java.base;
663 // By default, OpenJDK 9's javac will only compile such
664 // code if it's declared to also be in java.base at
665 // compile time.
666 //
667 // For now, we use --patch-module to put all sources
668 // and dependencies from this make target into java.base;
669 // other source directories in this make target are in
670 // packages not from java.base; if this becomes a problem
671 // in future, this could be addressed eg. by splitting
672 // boot{lib,test} out into a separate make target,
673 // deleting those tests or moving them to a different
674 // package.
675 patch_module: "java.base",
676}
677
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100678// Builds the core-ojtests-public library. Excludes any private API tests.
679// Like core-ojtests but smaller.
Colin Crossec80f4f2018-08-15 21:17:11 -0700680java_test {
681 name: "core-ojtests-public",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100682 visibility: [
683 "//cts/tests/libcore/ojluni",
684 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700685 defaults: ["libcore_java_defaults"],
686 srcs: [
687 "ojluni/src/test/java/**/*.java",
688 ],
689 // Filter out the following:
690 // 1.) DeserializeMethodTest and SerializedLambdaTest, because they depends on stub classes
691 // and won't actually run, and
692 // 2.) util/stream/boot*. Those directories contain classes in the package java.util.stream;
693 // excluding them means we don't need patch_module: "java.base"
694 exclude_srcs: [
695 "**/DeserializeMethodTest.java",
696 "**/SerializedLambdaTest.java",
697 "ojluni/src/test/java/util/stream/boot*/**/*",
698 ],
699 java_resource_dirs: [
700 "ojluni/src/test/java",
701 "ojluni/src/test/resources",
702 // Include source code as part of JAR
703 "ojluni/src/test/dist",
704 ],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100705
Paul Duffin83c25382019-06-07 14:10:49 +0100706 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100707 system_modules: "core-all-system-modules",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100708 libs: [
Neil Fuller4207c7f2018-10-10 14:01:40 +0100709 "bouncycastle",
710 "okhttp",
711 "testng",
712 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700713}
714
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100715// Exports annotated stubs source files in ojluni/annotations/sdk to make them
716// available to metalava. Used for nullability annotations in OpenJDK source.
Pete Gillin7db7faa2018-07-31 13:29:35 +0100717droiddoc_exported_dir {
Pete Gillin0728b742018-09-17 15:41:45 +0100718 name: "ojluni-annotated-sdk-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100719 visibility: [
720 "//frameworks/base",
721 ],
Pete Gillin0728b742018-09-17 15:41:45 +0100722 path: "ojluni/annotations/sdk",
Pete Gillin7db7faa2018-07-31 13:29:35 +0100723}
Paul Duffin48ac7b62019-03-28 14:28:06 +0000724
Pete Gillin600c7cf2018-08-16 19:28:38 +0100725droiddoc_exported_dir {
726 name: "ojluni-annotated-nullability-stubs",
727 path: "ojluni/annotations/sdk/nullability",
728}
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100729
730// Exports annotated stubs source files in ojluni/annotations/mmodules to make
Paul Duffinc241d6a2019-06-25 15:40:29 +0100731// them available to metalava. Used for core platform API and intra-core API
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100732// annotations in OpenJDK source.
Pete Gillinc9935b62018-09-25 14:42:40 +0100733droiddoc_exported_dir {
734 name: "ojluni-annotated-mmodule-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100735 visibility: [
736 "//libcore/mmodules/core_platform_api",
737 "//libcore/mmodules/intracoreapi",
738 ],
Pete Gillinc9935b62018-09-25 14:42:40 +0100739 path: "ojluni/annotations/mmodule",
740}
Pete Gillin7db7faa2018-07-31 13:29:35 +0100741
Neil Fuller6f16b462018-09-04 15:40:39 +0100742// A file containing the list of tags that are "known" to us from the OpenJdk
743// source code and so should not cause an error or warning.
Nan Zhangd55722b2018-02-27 15:08:20 -0800744filegroup {
745 name: "known-oj-tags",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100746 visibility: [
747 "//frameworks/base",
748 ],
Nan Zhangd55722b2018-02-27 15:08:20 -0800749 srcs: [
750 "known_oj_tags.txt",
751 ],
752}
Nan Zhang602fc0e2018-03-22 16:14:22 -0700753
Paul Duffina8bb6062019-09-25 15:50:13 +0100754// Generates stubs for the parts of the public SDK API provided by the ART module.
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000755//
Paul Duffina8bb6062019-09-25 15:50:13 +0100756// Only for use by art.module.public.api.stubs target below.
Nan Zhangf0207602018-09-10 18:57:38 -0700757droidstubs {
Paul Duffina8bb6062019-09-25 15:50:13 +0100758 name: "art-module-public-api-stubs-gen",
Paul Duffin53690cb2019-09-19 15:11:28 +0100759 srcs: [
Paul Duffina8bb6062019-09-25 15:50:13 +0100760 ":core_oj_api_files",
761 ":core_libart_api_files",
Paul Duffin53690cb2019-09-19 15:11:28 +0100762 ],
Tobias Thiererde991232018-03-07 15:10:46 +0000763 java_version: "1.9",
Nan Zhang602fc0e2018-03-22 16:14:22 -0700764 installable: false,
Paul Duffin419b2422019-06-25 15:42:05 +0100765 sdk_version: "none",
Nan Zhang602fc0e2018-03-22 16:14:22 -0700766}
767
Paul Duffina8bb6062019-09-25 15:50:13 +0100768// A stubs target containing the parts of the public SDK API provided by the ART module.
769java_library {
770 name: "art.module.public.api.stubs",
771 srcs: [":art-module-public-api-stubs-gen"],
772 errorprone: {
773 javacflags: [
774 "-Xep:MissingOverride:OFF",
775 ],
776 },
777 openjdk9: {
778 javacflags: ["--patch-module=java.base=."],
779 },
780 sdk_version: "none",
781 system_modules: "none",
782}
783
784// Used when compiling higher-level code against art.module.public.api.stubs.
785java_system_modules {
786 name: "art-module-public-api-stubs-system-modules",
787 visibility: [
788 "//external/wycheproof",
789 ],
790 libs: [
791 "art.module.public.api.stubs",
792 // This one is not on device but it's needed when javac compiles code
793 // containing lambdas.
794 "core-lambda-stubs-for-system-modules",
795 // This one is not on device but it's needed when javac compiles code
796 // containing @Generated annotations produced by some code generation
797 // tools.
798 // See http://b/123891440.
799 "core-generated-annotation-stubs",
800 ],
801}
802
803// Generates stubs for the parts of the public SDK API provided by the conscrypt module.
804//
805// Only for use by conscrypt.module.public.api.stubs target below.
806droidstubs {
807 name: "conscrypt-module-public-api-stubs-gen",
808 srcs: [
809 ":conscrypt_public_api_files",
810 ],
811 java_version: "1.9",
812 installable: false,
813 sdk_version: "none",
814 libs: [
815 "art.module.public.api.stubs",
816 ],
817}
818
819// A stubs target containing the parts of the public SDK API provided by the conscrypt module.
820java_library {
821 name: "conscrypt.module.public.api.stubs",
822 srcs: [":conscrypt-module-public-api-stubs-gen"],
823 errorprone: {
824 javacflags: [
825 "-Xep:MissingOverride:OFF",
826 ],
827 },
Paul Duffina8bb6062019-09-25 15:50:13 +0100828 sdk_version: "none",
Paul Duffin77f2c572019-09-27 11:01:06 +0100829 system_modules: "art-module-public-api-stubs-system-modules",
Paul Duffina8bb6062019-09-25 15:50:13 +0100830}
831
832// Generates stubs for the parts of the public SDK API provided by the i18n module.
833//
834// Only for use by i18n.module.public.api.stubs target below.
835droidstubs {
836 name: "i18n-module-public-api-stubs-gen",
837 srcs: [
838 ":android_icu4j_src_files",
839 ],
840 java_version: "1.9",
841 installable: false,
842 sdk_version: "none",
843 libs: [
844 "art.module.public.api.stubs",
845 ],
846}
847
848// A stubs target containing the parts of the public SDK API provided by the i18n module.
849java_library {
850 name: "i18n.module.public.api.stubs",
851 srcs: [":i18n-module-public-api-stubs-gen"],
852 errorprone: {
853 javacflags: [
854 "-Xep:MissingOverride:OFF",
855 ],
856 },
Paul Duffina8bb6062019-09-25 15:50:13 +0100857 sdk_version: "none",
Paul Duffin77f2c572019-09-27 11:01:06 +0100858 system_modules: "art-module-public-api-stubs-system-modules",
Paul Duffina8bb6062019-09-25 15:50:13 +0100859}
860
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000861// A stubs target containing the parts of the public SDK API provided by the
862// core library.
863//
864// Don't use this directly, use "sdk_version: core_current".
865java_library {
866 name: "core.current.stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100867 visibility: ["//visibility:public"],
Paul Duffina8bb6062019-09-25 15:50:13 +0100868 static_libs: [
869 "art.module.public.api.stubs",
870 "conscrypt.module.public.api.stubs",
871 "i18n.module.public.api.stubs",
872 ],
Paul Duffin83c25382019-06-07 14:10:49 +0100873 sdk_version: "none",
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000874 system_modules: "none",
Paul Duffin65641182019-04-08 10:24:23 +0100875
876 dist: {
877 targets: [
878 "sdk",
879 "win_sdk",
880 ],
881 },
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000882}
883
Neil Fuller61dabbf2018-10-21 22:53:18 +0100884// Used when compiling higher-level code against core.current.stubs.
885java_system_modules {
886 name: "core-current-stubs-system-modules",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100887 visibility: ["//visibility:public"],
Neil Fuller61dabbf2018-10-21 22:53:18 +0100888 libs: [
889 "core.current.stubs",
890 // This one is not on device but it's needed when javac compiles code
891 // containing lambdas.
892 "core-lambda-stubs-for-system-modules",
893 // This one is not on device but it's needed when javac compiles code
894 // containing @Generated annotations produced by some code generation
895 // tools.
896 // See http://b/123891440.
897 "core-generated-annotation-stubs",
898 ],
899}
900
Pete Gillin600c7cf2018-08-16 19:28:38 +0100901// Target for validating nullability annotations for correctness and
902// completeness. To check that there are no nullability errors:
903// make core-current-stubs-nullability-validation
904// To check that there are only the expected nullability warnings:
905// make core-current-stubs-nullability-validation-check-nullability-warnings
906// To update the the list of known expected nullability warnings:
907// make core-current-stubs-nullability-validation-update-nullability-warnings
908droidstubs {
909 name: "core-current-stubs-nullability-validation",
910 srcs: [":core_api_files"],
911 installable: false,
Paul Duffin419b2422019-06-25 15:42:05 +0100912 sdk_version: "none",
Pete Gillin600c7cf2018-08-16 19:28:38 +0100913 annotations_enabled: true,
914 args: "--hide-annotation libcore.api.Hide " +
915 "--validate-nullability-from-merged-stubs ",
916 merge_inclusion_annotations_dirs: ["ojluni-annotated-mmodule-stubs"],
917 merge_annotations_dirs: [
918 "metalava-manual",
919 // N.B. Stubs in this filegroup will be validated:
920 "ojluni-annotated-nullability-stubs",
921 ],
Pete Gillinc5f179b2018-11-14 18:42:19 +0000922 // The list of classes which have nullability annotations included in the source.
923 // (This is in addition to those which have annotations in the merged stubs.)
924 validate_nullability_from_list: "nullability_annotated_classes.txt",
Pete Gillin600c7cf2018-08-16 19:28:38 +0100925 // The expected set of warnings about missing annotations:
926 check_nullability_warnings: "nullability_warnings.txt",
927}
928
Neil Fullere784ef22018-11-16 15:54:30 +0000929// A host library containing time zone related classes. Used for
930// host-side tools and tests that have to deal with Android
931// time zone data.
932java_library_host {
933 name: "timezone-host",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100934 visibility: [
935 "//system/timezone/distro/core",
936 ],
Neil Fullere784ef22018-11-16 15:54:30 +0000937 srcs: [":timezone_host_files"],
938}
Andrei Onea24892e22019-04-16 16:48:37 +0100939
Victor Changb28d3f82019-08-09 16:24:46 +0100940// A library that contains annotations not retented in runtime and inline-able constants
941// that should not introduce any runtime dependency for compiling core libraries, e.g. core-icu4j,
942java_library {
943 name: "libcore-unsupportedappusage-annotation",
944 srcs: [
945 ":unsupportedappusage_annotation_files",
946 ],
947
948 installable: false,
949 sdk_version: "core_current",
950}
951
Andrei Onea24892e22019-04-16 16:48:37 +0100952// The source files that contain the UnsupportedAppUsage annotation and its dependencies.
953filegroup {
954 name: "unsupportedappusage_annotation_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100955 visibility: [
956 "//frameworks/base",
957 ],
Andrei Onea24892e22019-04-16 16:48:37 +0100958 srcs: [
959 "dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java",
960 "dalvik/src/main/java/dalvik/system/VersionCodes.java",
961 "luni/src/main/java/libcore/api/CorePlatformApi.java",
962 "luni/src/main/java/libcore/api/IntraCoreApi.java",
963 ],
Neil Fuller86345d72019-04-25 09:15:32 +0100964}