blob: 6a3672b8f58a6e8e731934cb32877fe5a9490b24 [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 Thiereraef55ca2019-08-28 22:41:57 +000055 "luni/src/main/java/libcore/net/android.mime.types",
Tobias Thierer79eea262019-08-01 14:05:11 +010056 "luni/src/main/java/java/util/logging/logging.properties",
57 "luni/src/main/java/java/security/security.properties",
58 ],
59}
60
61filegroup {
62 name: "core-ojluni-resources",
63 visibility: [
64 "//libcore:__subpackages__",
65 ],
66 path: "ojluni/src/main/resources/",
67 srcs: [
68 "ojluni/src/main/resources/**/*",
69 ],
70}
71
72core_resources = [
73 ":core-luni-resources",
74 ":core-ojluni-resources",
Tobias Thiereraef55ca2019-08-28 22:41:57 +000075 ":debian.mime.types",
Colin Crossaf0b54c2017-09-27 17:22:32 -070076]
77
Neil Fuller866ed4a2018-09-06 12:05:46 +010078// The source files that go into core-oj.
79filegroup {
80 name: "core_oj_java_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +010081 visibility: [
82 "//libcore:__subpackages__",
83 ],
Neil Fuller866ed4a2018-09-06 12:05:46 +010084 srcs: [":openjdk_java_files"],
85}
86
Neil Fullere32e2e12019-02-26 11:48:30 +000087// OpenJDK source is not annotated with @hide so we need this separate
Neil Fuller866ed4a2018-09-06 12:05:46 +010088// filegroup for just the parts that contribute to the API.
89filegroup {
90 name: "core_oj_api_files",
91 srcs: [":openjdk_javadoc_files"],
92}
93
94// The source files that go into core-libart.
95filegroup {
96 name: "core_libart_java_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +010097 visibility: [
98 "//libcore:__subpackages__",
99 ],
Neil Fuller866ed4a2018-09-06 12:05:46 +0100100 srcs: [
101 ":non_openjdk_java_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100102 ],
103}
104
Neil Fullere32e2e12019-02-26 11:48:30 +0000105// Some parts of libart are not annotated with @hide so we need this separate
Neil Fuller866ed4a2018-09-06 12:05:46 +0100106// filegroup for just the parts that contribute to the API.
107filegroup {
108 name: "core_libart_api_files",
109 srcs: [
110 ":non_openjdk_javadoc_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100111 ],
112}
113
Neil Fullere32e2e12019-02-26 11:48:30 +0000114// The set of files for the core library that have been marked up with @hide
115// for the public SDK APIs. Used from frameworks/base/ to indicate the source
116// files for inclusion in the public SDK docs.
117filegroup {
118 name: "core_public_api_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100119 visibility: [
120 "//frameworks/base",
121 ],
Neil Fullere32e2e12019-02-26 11:48:30 +0000122 srcs: [
Victor Changcad47af2019-08-06 16:33:38 +0100123 ":android_icu4j_src_files",
Neil Fullere32e2e12019-02-26 11:48:30 +0000124 ":core_oj_api_files",
125 ":core_libart_api_files",
126 ":conscrypt_public_api_files",
127 ],
128}
129
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100130// The set of files for the core library that have been marked up with @hide and
131// API-related annotations. Note that this includes the intra-core and
132// core-platform APIs as well as the public APIs.
133//
Neil Fullere32e2e12019-02-26 11:48:30 +0000134// Some source files in :core_oj_api_files and :openjdk_mmodule_extra_files are
135// annotated by applying annotations to the .annotated.java stubs files in
136// ojluni/annotated/mmodules and rather than in the original source. See the comments
137// in openjdk_java_files.bp for more details.
Neil Fuller866ed4a2018-09-06 12:05:46 +0100138filegroup {
139 name: "core_api_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100140 visibility: [
141 "//libcore:__subpackages__",
142 ],
Neil Fuller866ed4a2018-09-06 12:05:46 +0100143 srcs: [
Victor Changcad47af2019-08-06 16:33:38 +0100144 ":android_icu4j_src_files",
Neil Fullerd129bc92018-09-26 11:12:58 +0100145 ":apache-xml_api_files",
Neil Fullera77f7102018-09-21 19:04:41 +0100146 ":bouncycastle_java_files",
Neil Fuller603e1a72018-09-25 11:55:41 +0100147 ":conscrypt_java_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100148 ":core_oj_api_files",
149 ":core_libart_api_files",
Neil Fuller641d5f92018-09-24 15:40:39 +0100150 ":okhttp_api_files",
Pete Gillinc9935b62018-09-25 14:42:40 +0100151 ":openjdk_mmodule_extra_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100152 ],
153}
154
Colin Crossaf0b54c2017-09-27 17:22:32 -0700155java_defaults {
156 name: "libcore_java_defaults",
157 javacflags: [
158 //"-Xlint:all",
159 //"-Xlint:-serial,-deprecation,-unchecked",
160 ],
161 dxflags: ["--core-library"],
Andreas Gampe66b31732018-02-20 09:22:16 -0800162 errorprone: {
163 javacflags: [
Paul Duffinc31f6bb2019-05-15 12:32:44 +0100164 "-Xep:MissingOverride:OFF", // Ignore missing @Override.
165 "-Xep:ConstantOverflow:WARN", // Known constant overflow in SplittableRandom
Andreas Gampe66b31732018-02-20 09:22:16 -0800166 ],
167 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700168}
169
170//
171// Build for the target (device).
172//
173
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100174// Visibility of core-all* build modules; we restrict visibility of core-all deliberately to
175// a small set of build modules that the core library team control. See core-all-system-modules
176// for more details.
177core_all_visibility = [
178 "//external/apache-harmony:__subpackages__",
179 "//external/apache-xml",
180 "//external/bouncycastle",
181 "//external/conscrypt",
182 "//external/icu/android_icu4j",
183 "//external/okhttp",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100184 "//libcore:__subpackages__",
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100185]
186
Tobias Thierer52331642019-05-29 12:11:39 +0000187// A target used to bootstrap compilation for the core library.
188// See core-all-system-modules for more details.
189java_library {
190 name: "core-all",
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100191 visibility: core_all_visibility,
Tobias Thierer52331642019-05-29 12:11:39 +0000192 defaults: ["libcore_java_defaults"],
Colin Crossaf0b54c2017-09-27 17:22:32 -0700193
194 srcs: [
Victor Changcad47af2019-08-06 16:33:38 +0100195 ":android_icu4j_src_files",
Neil Fuller866ed4a2018-09-06 12:05:46 +0100196 ":core_oj_java_files",
197 ":core_libart_java_files",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700198 ":openjdk_lambda_stub_files",
Pete Gillin54035812019-05-08 15:09:39 +0100199 ":openjdk_generated_annotation_stub_files",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700200 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700201
Paul Duffin83c25382019-06-07 14:10:49 +0100202 sdk_version: "none",
Colin Crossec80f4f2018-08-15 21:17:11 -0700203 system_modules: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700204 openjdk9: {
205 srcs: ["luni/src/module/java/module-info.java"],
206 javacflags: ["--patch-module=java.base=."],
207 },
Colin Crossec80f4f2018-08-15 21:17:11 -0700208
Tobias Thierer79eea262019-08-01 14:05:11 +0100209 java_resources: core_resources,
Victor Chang7fef4052018-09-25 14:12:03 +0100210 static_libs: ["android_icu4j_resources_lib"],
Tobias Thiererde991232018-03-07 15:10:46 +0000211 java_version: "1.9",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700212
Colin Crossaf0b54c2017-09-27 17:22:32 -0700213 installable: false,
atrost98ec08d2019-08-05 12:23:41 +0100214
215 plugins: ["compat-changeid-annotation-processor"],
216}
217
218platform_compat_config {
219 name: "libcore-platform-compat-config",
atrost98ec08d2019-08-05 12:23:41 +0100220 src: ":core-all",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700221}
222
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100223// A system modules definition for use by core library targets only. It only
224// contains the core-all jar, which contains the classes that end up in core-oj,
225// core-libart as well as the lambda stubs needed to compile Java lambda code.
226// It does not contain other parts of core library like conscrypt, bouncycastle,
227// etc. This system_modules definition is used to bootstrap compilation for
Victor Changcad47af2019-08-06 16:33:38 +0100228// other parts of the core library like core-oj, core-libart, core-icu4j, conscrypt,
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100229// bouncycastle, etc.
Colin Crossa4d9fc42017-09-29 18:04:37 -0700230java_system_modules {
231 name: "core-all-system-modules",
Tobias Thierercf66bfd2019-05-29 13:18:25 +0100232 visibility: core_all_visibility,
Colin Crossa4d9fc42017-09-29 18:04:37 -0700233 libs: ["core-all"],
234}
235
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100236// Contains the parts of core library associated with OpenJDK.
Colin Crossaf0b54c2017-09-27 17:22:32 -0700237java_library {
238 name: "core-oj",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000239 visibility: [
240 "//art/build/apex",
241 "//external/wycheproof",
Paul Duffin94f70232019-05-22 16:22:29 +0100242 "//libcore/benchmarks",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000243 ],
Colin Crossaf0b54c2017-09-27 17:22:32 -0700244 defaults: ["libcore_java_defaults"],
Colin Cross5b75cdd2018-06-27 11:00:13 -0700245 installable: true,
Colin Crossbb180be2017-10-09 14:54:53 -0700246 hostdex: true,
Colin Crossaf0b54c2017-09-27 17:22:32 -0700247
Neil Fuller866ed4a2018-09-06 12:05:46 +0100248 srcs: [":core_oj_java_files"],
Tobias Thierer79eea262019-08-01 14:05:11 +0100249 java_resources: core_resources,
Colin Crossec80f4f2018-08-15 21:17:11 -0700250
Paul Duffin83c25382019-06-07 14:10:49 +0100251 sdk_version: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700252 system_modules: "core-all-system-modules",
253 openjdk9: {
254 javacflags: ["--patch-module=java.base=."],
255 },
Colin Crossec80f4f2018-08-15 21:17:11 -0700256
Pete Gillin7a7a6d22017-12-19 14:56:03 +0000257 jacoco: {
Pete Gillin27ca0582018-01-10 17:04:17 +0000258 exclude_filter: [
Pete Gillin3f59bad2018-01-30 11:20:29 +0000259 "java.lang.Class",
260 "java.lang.Long",
261 "java.lang.Number",
262 "java.lang.Object",
263 "java.lang.String",
264 "java.lang.invoke.MethodHandle",
265 "java.lang.ref.Reference",
266 "java.lang.reflect.Proxy",
Pete Gillinb1868ada2018-01-17 11:03:10 +0000267 "java.util.AbstractMap",
Pete Gillin3f59bad2018-01-30 11:20:29 +0000268 "java.util.HashMap",
269 "java.util.HashMap$Node",
Pete Gillinb1868ada2018-01-17 11:03:10 +0000270 "java.util.Map",
Pete Gillin7a7a6d22017-12-19 14:56:03 +0000271 ],
272 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700273
274 notice: "ojluni/NOTICE",
275
Colin Crossaf0b54c2017-09-27 17:22:32 -0700276}
277
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100278// Contains parts of core library not associated with OpenJDK. Contains not
Victor Changcad47af2019-08-06 16:33:38 +0100279// just java.*, javax.* code but also android.system.* and various internal
280// libcore.* packages.
Colin Crossaf0b54c2017-09-27 17:22:32 -0700281java_library {
282 name: "core-libart",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000283 visibility: [
284 "//art/build/apex",
285 "//external/robolectric-shadows",
286 "//external/wycheproof",
Paul Duffin94f70232019-05-22 16:22:29 +0100287 "//libcore/benchmarks",
Colin Crossf0ef6252019-05-31 08:26:47 -0700288 "//frameworks/layoutlib",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000289 ],
Colin Crossaf0b54c2017-09-27 17:22:32 -0700290 defaults: ["libcore_java_defaults"],
Colin Cross5b75cdd2018-06-27 11:00:13 -0700291 installable: true,
Colin Crossbb180be2017-10-09 14:54:53 -0700292 hostdex: true,
Colin Crossaf0b54c2017-09-27 17:22:32 -0700293
Neil Fuller866ed4a2018-09-06 12:05:46 +0100294 srcs: [":core_libart_java_files"],
Tobias Thiererde991232018-03-07 15:10:46 +0000295 java_version: "1.9",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700296
Paul Duffin83c25382019-06-07 14:10:49 +0100297 sdk_version: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700298 system_modules: "core-all-system-modules",
299 openjdk9: {
300 javacflags: ["--patch-module=java.base=."],
301 },
Colin Crossec80f4f2018-08-15 21:17:11 -0700302
Pete Gillin80ebe872018-02-13 15:21:20 +0000303 jacoco: {
304 exclude_filter: [
305 "java.lang.DexCache",
306 "dalvik.system.ClassExt",
307 ],
308 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700309
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700310 target: {
311 hostdex: {
312 required: [
Neil Fuller53c5f032019-06-05 13:47:39 +0100313 // Files used to simulate the /system, runtime APEX and tzdata
314 // APEX dir structure on host.
315 "icu_tzdata.dat_host_tzdata_apex",
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700316 "tzdata_host",
Neil Fuller53c5f032019-06-05 13:47:39 +0100317 "tzdata_host_tzdata_apex",
Neil Fuller53c5f032019-06-05 13:47:39 +0100318 "tzlookup.xml_host_tzdata_apex",
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700319 "tz_version_host",
Neil Fuller53c5f032019-06-05 13:47:39 +0100320 "tz_version_host_tzdata_apex",
Andreas Gampe9a1ba892019-04-24 12:35:40 -0700321 ],
322 },
323 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700324}
325
Victor Changb28d3f82019-08-09 16:24:46 +0100326// A separated core library that contains ICU4J because ICU4J will be in a different APEX module,
327// not in Runtime module.
Victor Changcad47af2019-08-06 16:33:38 +0100328java_library {
329 name: "core-icu4j",
330 visibility: [
331 "//art/build/apex",
332 "//external/robolectric-shadows",
333 "//frameworks/layoutlib",
334 ],
335 defaults: ["libcore_java_defaults"],
336 installable: true,
337 hostdex: true,
338
339 srcs: [":android_icu4j_src_files"],
Victor Changb28d3f82019-08-09 16:24:46 +0100340 libs: ["libcore-unsupportedappusage-annotation"],
341 static_libs: ["android_icu4j_resources_lib_sdk_core_current"],
Victor Changcad47af2019-08-06 16:33:38 +0100342
Paul Duffina8bb6062019-09-25 15:50:13 +0100343 // We use art-module-public-api-stubs-system-modules when compiling core-icu4j as ICU4J does not
344 // use any internal or android specific code. If it ever did then it could depend on
345 // core-intra-stubs-system-modules (a superset) instead.
346 // It is important that core-icu4j is restricted to only use stable APIs from the ART module
347 // since it is in a different APEX module that can be updated independently.
348 sdk_version: "none",
349 system_modules: "art-module-public-api-stubs-system-modules",
Victor Changcad47af2019-08-06 16:33:38 +0100350 openjdk9: {
351 javacflags: ["--patch-module=java.base=."],
352 },
353}
354
Paul Duffin7bb8d232018-10-23 11:48:38 +0100355// Provided solely to contribute information about which hidden parts of the
356// core-oj API are used by apps.
Paul Duffinc6bf27b2019-05-15 14:41:00 +0100357//
358// The build system determines that this library provides hiddenapi information
359// for the core-oj bootjar because its name is of the form <x>-hiddenapi, where
360// <x> is the name of a boot jar. That triggers the generation of a flags.csv
361// file which encapsulates information extracted from the UnsupportedAppUsage
362// annotations in the dex. The information from that file is then encoded into
363// the core-oj file.
364//
365// Usually, e.g. for core-libart, the UnsupportedAppUsage annotations are
366// added to the source that is compiled directly into the bootjar and the build
367// system extracts the information about UnsupportedAppUsage directly from
368// there.
369//
370// This approach of having separate annotated source and a separate build
371// target was taken for ojluni to avoid having to maintain local patches in the
372// ojluni source for UnsupportedAppUsage annotations as that would make it more
373// difficult to pull down changes from upstream.
374//
Paul Duffin7bb8d232018-10-23 11:48:38 +0100375java_library {
376 name: "core-oj-hiddenapi",
Paul Duffin48ac7b62019-03-28 14:28:06 +0000377 // Do not allow this to be accessed from outside this directory.
378 visibility: ["//visibility:private"],
Paul Duffin7bb8d232018-10-23 11:48:38 +0100379 defaults: ["libcore_java_defaults"],
380 compile_dex: true,
381
382 srcs: [":openjdk_hiddenapi_javadoc_files"],
383
Paul Duffin83c25382019-06-07 14:10:49 +0100384 sdk_version: "none",
Paul Duffin7bb8d232018-10-23 11:48:38 +0100385 system_modules: "core-all-system-modules",
386 openjdk9: {
387 javacflags: ["--patch-module=java.base=."],
388 },
389}
390
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100391//
Victor Changcad47af2019-08-06 16:33:38 +0100392// Guaranteed unstripped versions of core-icu4j, core-oj and core-libart.
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100393//
Colin Cross3c6c2e22017-10-18 13:24:52 -0700394// The build system may or may not strip the core-oj and core-libart jars,
395// but these will not be stripped. See b/24535627.
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100396//
397
Colin Cross3c6c2e22017-10-18 13:24:52 -0700398java_library {
399 name: "core-oj-testdex",
Colin Cross5b75cdd2018-06-27 11:00:13 -0700400 installable: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700401 static_libs: ["core-oj"],
Paul Duffin83c25382019-06-07 14:10:49 +0100402 sdk_version: "none",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700403 system_modules: "core-all-system-modules",
404 dxflags: ["--core-library"],
Colin Cross485ed362017-12-05 17:24:22 -0800405 dex_preopt: {
406 enabled: false,
407 },
Tobias Thiererde991232018-03-07 15:10:46 +0000408 java_version: "1.9",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700409 notice: "ojluni/NOTICE",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700410}
411
412java_library {
413 name: "core-libart-testdex",
Colin Cross5b75cdd2018-06-27 11:00:13 -0700414 installable: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700415 static_libs: ["core-libart"],
Paul Duffin83c25382019-06-07 14:10:49 +0100416 sdk_version: "none",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700417 system_modules: "core-all-system-modules",
418 dxflags: ["--core-library"],
Colin Cross485ed362017-12-05 17:24:22 -0800419 dex_preopt: {
420 enabled: false,
421 },
Colin Cross3c6c2e22017-10-18 13:24:52 -0700422 notice: "ojluni/NOTICE",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700423}
424
Victor Changcad47af2019-08-06 16:33:38 +0100425java_library {
426 name: "core-icu4j-testdex",
427 installable: true,
428 static_libs: ["core-icu4j"],
429 sdk_version: "none",
Victor Changcad47af2019-08-06 16:33:38 +0100430 system_modules: "core-all-system-modules",
431 dxflags: ["--core-library"],
432 dex_preopt: {
433 enabled: false,
434 },
435}
436
Tobias Thierere0f8b312018-10-23 23:12:30 +0100437java_defaults {
438 name: "core_lambda_stubs_defaults",
Colin Crossaf0b54c2017-09-27 17:22:32 -0700439 defaults: ["libcore_java_defaults"],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100440 hostdex: true,
Colin Crossaf0b54c2017-09-27 17:22:32 -0700441
Paul Duffin83c25382019-06-07 14:10:49 +0100442 sdk_version: "none",
Colin Crossa4d9fc42017-09-29 18:04:37 -0700443 system_modules: "core-all-system-modules",
444 openjdk9: {
445 javacflags: ["--patch-module=java.base=."],
446 },
Colin Crossaf0b54c2017-09-27 17:22:32 -0700447
448 notice: "ojluni/NOTICE",
449
450 installable: false,
451 include_srcs: true,
452}
Colin Crossa4d9fc42017-09-29 18:04:37 -0700453
Tobias Thierere0f8b312018-10-23 23:12:30 +0100454// Creates a jar that exists to satisfy javac when compiling source code that
455// contains lambdas. This contains all classes / methods required by javac
456// when generating invoke-dynamic lambda implementation code, even those that
457// are also in the public SDK API from API level 26 onwards.
458java_library {
459 name: "core-lambda-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100460 visibility: ["//visibility:public"],
Tobias Thierere0f8b312018-10-23 23:12:30 +0100461 defaults: ["core_lambda_stubs_defaults"],
462 srcs: [
463 ":openjdk_lambda_stub_files",
464 ":openjdk_lambda_duplicate_stub_files",
465 ],
466}
467
468// An alternative to core-lambda-stubs that omits openjdk_lambda_duplicate_stub_files
469// because those classes are also part of the core library public SDK API
470// (since API level 26).
471java_library {
472 name: "core-lambda-stubs-for-system-modules",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100473 visibility: [
474 "//libcore/mmodules/core_platform_api",
475 ],
Tobias Thierere0f8b312018-10-23 23:12:30 +0100476 defaults: ["core_lambda_stubs_defaults"],
477 srcs: [
478 ":openjdk_lambda_stub_files",
479 ],
480}
481
Pete Gillin54035812019-05-08 15:09:39 +0100482// Creates a jar that exists to satisfy javac when compiling source code that
483// contains @Generated annotations, which are produced by some code generation
484// tools (notably dagger) but aren't part of the Android API.
485// See http://b/123891440.
486java_library {
487 name: "core-generated-annotation-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100488 visibility: [
489 "//libcore/mmodules/core_platform_api",
490 ],
Pete Gillin54035812019-05-08 15:09:39 +0100491 defaults: ["libcore_java_defaults"],
492 srcs: [
493 ":openjdk_generated_annotation_stub_files",
494 ],
495 hostdex: true,
Paul Duffin83c25382019-06-07 14:10:49 +0100496 sdk_version: "none",
Pete Gillin54035812019-05-08 15:09:39 +0100497 system_modules: "core-all-system-modules",
498 openjdk9: {
499 javacflags: ["--patch-module=java.base=."],
500 },
501 notice: "ojluni/NOTICE",
502 installable: false,
503 include_srcs: true,
504}
505
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100506// Builds libcore test rules
Colin Cross3c6c2e22017-10-18 13:24:52 -0700507java_library_static {
508 name: "core-test-rules",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100509 visibility: [
Paul Duffin01f6c022019-09-24 14:44:15 +0100510 "//external/conscrypt",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100511 "//frameworks/base/location/tests/locationtests",
512 ],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700513 hostdex: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700514 srcs: [
515 "dalvik/test-rules/src/main/**/*.java",
516 "test-rules/src/main/**/*.java",
517 ],
518 static_libs: ["junit"],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100519
Paul Duffin83c25382019-06-07 14:10:49 +0100520 sdk_version: "none",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100521 system_modules: "core-all-system-modules",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700522}
523
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100524// Builds the core-tests-support library used by various tests.
Colin Cross3c6c2e22017-10-18 13:24:52 -0700525java_library_static {
526 name: "core-tests-support",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100527 visibility: [
528 "//cts/apps/CtsVerifier",
529 "//cts/tests/tests/keystore",
530 "//cts/tests/tests/net",
531 "//cts/tests/tests/net/api23Test",
532 "//external/apache-harmony",
533 "//frameworks/base/core/tests/coretests",
534 "//libcore/benchmarks",
535 "//packages/apps/KeyChain/tests",
536 "//system/timezone/distro/core",
537 ],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700538 hostdex: true,
Colin Cross3c6c2e22017-10-18 13:24:52 -0700539 srcs: ["support/src/test/java/**/*.java"],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100540
Paul Duffin53c491f2019-06-12 13:48:14 +0100541 sdk_version: "core_platform",
Neil Fuller4380ab22018-10-18 19:38:53 +0100542 libs: ["junit"],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700543 static_libs: [
Neil Fullerde8b0862018-10-12 21:53:31 +0100544 "bouncycastle-unbundled",
545 "bouncycastle-bcpkix-unbundled",
546 "bouncycastle-ocsp-unbundled",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700547 ],
548}
549
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100550// Builds the jsr166-tests library.
Colin Crossec80f4f2018-08-15 21:17:11 -0700551java_test {
Colin Cross3c6c2e22017-10-18 13:24:52 -0700552 name: "jsr166-tests",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100553 visibility: [
554 "//cts/tests/libcore/jsr166",
555 ],
Colin Cross3c6c2e22017-10-18 13:24:52 -0700556 srcs: ["jsr166-tests/src/test/java/**/*.java"],
Paul Duffin83c25382019-06-07 14:10:49 +0100557 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100558 system_modules: "core-all-system-modules",
Colin Cross3c6c2e22017-10-18 13:24:52 -0700559 libs: [
560 "junit",
561 ],
562}
Nan Zhang65f27a32018-01-05 10:41:46 -0800563
Pete Gillinec902b82019-06-26 17:23:00 +0100564// A filegroup that provides access to a source file for a toolchain test that
565// checks Java 9 language features are handled properly by JarJar.
566filegroup {
567 name: "core-java-9-language-features-source",
568 srcs: ["luni/src/main/java/libcore/internal/Java9LanguageFeatures.java"],
569 visibility: ["//libcore/luni/src/test/java9language"],
570}
571
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100572// Builds the core-tests library.
Colin Crossec80f4f2018-08-15 21:17:11 -0700573java_test {
574 name: "core-tests",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100575 visibility: [
576 "//cts/tests/libcore/luni",
577 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700578 defaults: ["libcore_java_defaults"],
579 hostdex: true,
580 srcs: [
581 "dalvik/src/test/java/**/*.java",
582 "dalvik/test-rules/src/test/java/**/*.java",
583 "dom/src/test/java/**/*.java",
584 "harmony-tests/src/test/java/**/*.java",
585 "json/src/test/java/**/*.java",
586 "luni/src/test/java/**/*.java",
Paul Duffin4ba14532019-03-21 10:32:41 +0000587 "test-rules/src/test/java/**/*.java",
Colin Crossec80f4f2018-08-15 21:17:11 -0700588 "xml/src/test/java/**/*.java",
589 ],
590 exclude_srcs: [
591 "luni/src/test/java/libcore/java/util/zip/Zip64Test.java",
592 "luni/src/test/java/libcore/java/util/zip/Zip64FileTest.java",
593 ],
594
595 java_resource_dirs: [
596 "*/src/test/java",
597 "*/src/test/resources",
598 ],
599 exclude_java_resource_dirs: [
600 "ojluni/src/test/java",
601 "ojluni/src/test/resources",
602 ],
603
604 java_resources: [
Paul Duffin16a057f2019-05-13 12:20:55 +0100605 ":annotations-test",
Colin Crossec80f4f2018-08-15 21:17:11 -0700606 ":filesystemstest",
607 ":parameter-metadata-test",
608 ],
609
Paul Duffin83c25382019-06-07 14:10:49 +0100610 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100611 system_modules: "core-all-system-modules",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100612 libs: [
Neil Fuller4207c7f2018-10-10 14:01:40 +0100613 "okhttp",
614 "bouncycastle",
615 ],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100616
Colin Crossec80f4f2018-08-15 21:17:11 -0700617 static_libs: [
618 "archive-patcher",
Pete Gillin05a43202019-06-27 14:41:21 +0100619 "core-java-9-language-tests",
Colin Crossec80f4f2018-08-15 21:17:11 -0700620 "core-test-rules",
621 "core-tests-support",
622 "junit-params",
623 "mockftpserver",
624 "mockito-target",
625 "mockwebserver",
626 "nist-pkix-tests",
627 "slf4j-jdk14",
628 "sqlite-jdbc",
629 "tzdata-testing",
Paul Duffina4df2372018-12-10 15:48:01 +0000630 "truth-prebuilt",
Colin Crossec80f4f2018-08-15 21:17:11 -0700631 ],
632
633 errorprone: {
634 javacflags: [
635 "-Xep:TryFailThrowable:ERROR",
636 "-Xep:ComparisonOutOfRange:ERROR",
637 ],
638 },
Simran Basi3be01e02018-08-21 17:53:49 -0700639
640 test_config: "AndroidTest-core-tests.xml",
Colin Crossec80f4f2018-08-15 21:17:11 -0700641}
642
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100643// Builds the core-ojtests library that contains test code from OpenJDK.
Colin Crossec80f4f2018-08-15 21:17:11 -0700644java_test {
645 name: "core-ojtests",
646 defaults: ["libcore_java_defaults"],
647 hostdex: true,
648
649 srcs: [
650 "ojluni/src/test/java/**/*.java",
651 ],
652 java_resource_dirs: [
653 "ojluni/src/test/java",
654 "ojluni/src/test/resources",
655 ],
Neil Fullerb669ccb2018-10-04 23:10:27 +0100656
Paul Duffin83c25382019-06-07 14:10:49 +0100657 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100658 system_modules: "core-all-system-modules",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100659 libs: [
Neil Fuller4207c7f2018-10-10 14:01:40 +0100660 "okhttp",
661 "bouncycastle",
662 ],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100663
Colin Crossec80f4f2018-08-15 21:17:11 -0700664 static_libs: ["testng"],
665
666 // ojluni/src/test/java/util/stream/{bootlib,boottest}
667 // contains tests that are in packages from java.base;
668 // By default, OpenJDK 9's javac will only compile such
669 // code if it's declared to also be in java.base at
670 // compile time.
671 //
672 // For now, we use --patch-module to put all sources
673 // and dependencies from this make target into java.base;
674 // other source directories in this make target are in
675 // packages not from java.base; if this becomes a problem
676 // in future, this could be addressed eg. by splitting
677 // boot{lib,test} out into a separate make target,
678 // deleting those tests or moving them to a different
679 // package.
680 patch_module: "java.base",
681}
682
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100683// Builds the core-ojtests-public library. Excludes any private API tests.
684// Like core-ojtests but smaller.
Colin Crossec80f4f2018-08-15 21:17:11 -0700685java_test {
686 name: "core-ojtests-public",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100687 visibility: [
688 "//cts/tests/libcore/ojluni",
689 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700690 defaults: ["libcore_java_defaults"],
691 srcs: [
692 "ojluni/src/test/java/**/*.java",
693 ],
694 // Filter out the following:
695 // 1.) DeserializeMethodTest and SerializedLambdaTest, because they depends on stub classes
696 // and won't actually run, and
697 // 2.) util/stream/boot*. Those directories contain classes in the package java.util.stream;
698 // excluding them means we don't need patch_module: "java.base"
699 exclude_srcs: [
700 "**/DeserializeMethodTest.java",
701 "**/SerializedLambdaTest.java",
702 "ojluni/src/test/java/util/stream/boot*/**/*",
703 ],
704 java_resource_dirs: [
705 "ojluni/src/test/java",
706 "ojluni/src/test/resources",
707 // Include source code as part of JAR
708 "ojluni/src/test/dist",
709 ],
Neil Fuller4207c7f2018-10-10 14:01:40 +0100710
Paul Duffin83c25382019-06-07 14:10:49 +0100711 sdk_version: "none",
Paul Duffin0e0f8c42019-09-20 14:49:55 +0100712 system_modules: "core-all-system-modules",
Neil Fuller4207c7f2018-10-10 14:01:40 +0100713 libs: [
Neil Fuller4207c7f2018-10-10 14:01:40 +0100714 "bouncycastle",
715 "okhttp",
716 "testng",
717 ],
Colin Crossec80f4f2018-08-15 21:17:11 -0700718}
719
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100720// Exports annotated stubs source files in ojluni/annotations/sdk to make them
721// available to metalava. Used for nullability annotations in OpenJDK source.
Pete Gillin7db7faa2018-07-31 13:29:35 +0100722droiddoc_exported_dir {
Pete Gillin0728b742018-09-17 15:41:45 +0100723 name: "ojluni-annotated-sdk-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100724 visibility: [
725 "//frameworks/base",
726 ],
Pete Gillin0728b742018-09-17 15:41:45 +0100727 path: "ojluni/annotations/sdk",
Pete Gillin7db7faa2018-07-31 13:29:35 +0100728}
Paul Duffin48ac7b62019-03-28 14:28:06 +0000729
Pete Gillin600c7cf2018-08-16 19:28:38 +0100730droiddoc_exported_dir {
731 name: "ojluni-annotated-nullability-stubs",
732 path: "ojluni/annotations/sdk/nullability",
733}
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100734
735// Exports annotated stubs source files in ojluni/annotations/mmodules to make
Paul Duffinc241d6a2019-06-25 15:40:29 +0100736// them available to metalava. Used for core platform API and intra-core API
Neil Fuller77e3f3b2018-10-19 10:22:32 +0100737// annotations in OpenJDK source.
Pete Gillinc9935b62018-09-25 14:42:40 +0100738droiddoc_exported_dir {
739 name: "ojluni-annotated-mmodule-stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100740 visibility: [
741 "//libcore/mmodules/core_platform_api",
742 "//libcore/mmodules/intracoreapi",
743 ],
Pete Gillinc9935b62018-09-25 14:42:40 +0100744 path: "ojluni/annotations/mmodule",
745}
Pete Gillin7db7faa2018-07-31 13:29:35 +0100746
Neil Fuller6f16b462018-09-04 15:40:39 +0100747// A file containing the list of tags that are "known" to us from the OpenJdk
748// source code and so should not cause an error or warning.
Nan Zhangd55722b2018-02-27 15:08:20 -0800749filegroup {
750 name: "known-oj-tags",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100751 visibility: [
752 "//frameworks/base",
753 ],
Nan Zhangd55722b2018-02-27 15:08:20 -0800754 srcs: [
755 "known_oj_tags.txt",
756 ],
757}
Nan Zhang602fc0e2018-03-22 16:14:22 -0700758
Paul Duffina8bb6062019-09-25 15:50:13 +0100759// Generates stubs for the parts of the public SDK API provided by the ART module.
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000760//
Paul Duffina8bb6062019-09-25 15:50:13 +0100761// Only for use by art.module.public.api.stubs target below.
Nan Zhangf0207602018-09-10 18:57:38 -0700762droidstubs {
Paul Duffina8bb6062019-09-25 15:50:13 +0100763 name: "art-module-public-api-stubs-gen",
Paul Duffin53690cb2019-09-19 15:11:28 +0100764 srcs: [
Paul Duffina8bb6062019-09-25 15:50:13 +0100765 ":core_oj_api_files",
766 ":core_libart_api_files",
Paul Duffin53690cb2019-09-19 15:11:28 +0100767 ],
Tobias Thiererde991232018-03-07 15:10:46 +0000768 java_version: "1.9",
Nan Zhang602fc0e2018-03-22 16:14:22 -0700769 installable: false,
Paul Duffin419b2422019-06-25 15:42:05 +0100770 sdk_version: "none",
Nan Zhang602fc0e2018-03-22 16:14:22 -0700771}
772
Paul Duffina8bb6062019-09-25 15:50:13 +0100773// A stubs target containing the parts of the public SDK API provided by the ART module.
774java_library {
775 name: "art.module.public.api.stubs",
776 srcs: [":art-module-public-api-stubs-gen"],
777 errorprone: {
778 javacflags: [
779 "-Xep:MissingOverride:OFF",
780 ],
781 },
782 openjdk9: {
783 javacflags: ["--patch-module=java.base=."],
784 },
785 sdk_version: "none",
786 system_modules: "none",
787}
788
789// Used when compiling higher-level code against art.module.public.api.stubs.
790java_system_modules {
791 name: "art-module-public-api-stubs-system-modules",
792 visibility: [
793 "//external/wycheproof",
794 ],
795 libs: [
796 "art.module.public.api.stubs",
797 // This one is not on device but it's needed when javac compiles code
798 // containing lambdas.
799 "core-lambda-stubs-for-system-modules",
800 // This one is not on device but it's needed when javac compiles code
801 // containing @Generated annotations produced by some code generation
802 // tools.
803 // See http://b/123891440.
804 "core-generated-annotation-stubs",
805 ],
806}
807
808// Generates stubs for the parts of the public SDK API provided by the conscrypt module.
809//
810// Only for use by conscrypt.module.public.api.stubs target below.
811droidstubs {
812 name: "conscrypt-module-public-api-stubs-gen",
813 srcs: [
814 ":conscrypt_public_api_files",
815 ],
816 java_version: "1.9",
817 installable: false,
818 sdk_version: "none",
819 libs: [
820 "art.module.public.api.stubs",
821 ],
822}
823
824// A stubs target containing the parts of the public SDK API provided by the conscrypt module.
825java_library {
826 name: "conscrypt.module.public.api.stubs",
827 srcs: [":conscrypt-module-public-api-stubs-gen"],
828 errorprone: {
829 javacflags: [
830 "-Xep:MissingOverride:OFF",
831 ],
832 },
833 openjdk9: {
834 javacflags: ["--patch-module=java.base=."],
835 },
836 sdk_version: "none",
837 system_modules: "none",
838 libs: [
839 "art.module.public.api.stubs",
840 ],
841}
842
843// Generates stubs for the parts of the public SDK API provided by the i18n module.
844//
845// Only for use by i18n.module.public.api.stubs target below.
846droidstubs {
847 name: "i18n-module-public-api-stubs-gen",
848 srcs: [
849 ":android_icu4j_src_files",
850 ],
851 java_version: "1.9",
852 installable: false,
853 sdk_version: "none",
854 libs: [
855 "art.module.public.api.stubs",
856 ],
857}
858
859// A stubs target containing the parts of the public SDK API provided by the i18n module.
860java_library {
861 name: "i18n.module.public.api.stubs",
862 srcs: [":i18n-module-public-api-stubs-gen"],
863 errorprone: {
864 javacflags: [
865 "-Xep:MissingOverride:OFF",
866 ],
867 },
868 openjdk9: {
869 javacflags: ["--patch-module=java.base=."],
870 },
871 sdk_version: "none",
872 system_modules: "none",
873 libs: [
874 "art.module.public.api.stubs",
875 ],
876}
877
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000878// A stubs target containing the parts of the public SDK API provided by the
879// core library.
880//
881// Don't use this directly, use "sdk_version: core_current".
882java_library {
883 name: "core.current.stubs",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100884 visibility: ["//visibility:public"],
Paul Duffina8bb6062019-09-25 15:50:13 +0100885 static_libs: [
886 "art.module.public.api.stubs",
887 "conscrypt.module.public.api.stubs",
888 "i18n.module.public.api.stubs",
889 ],
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000890 openjdk9: {
891 javacflags: ["--patch-module=java.base=."],
892 },
Paul Duffin83c25382019-06-07 14:10:49 +0100893 sdk_version: "none",
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000894 system_modules: "none",
Paul Duffin65641182019-04-08 10:24:23 +0100895
896 dist: {
897 targets: [
898 "sdk",
899 "win_sdk",
900 ],
901 },
Paul Duffin0ca3cbe2019-02-14 15:47:58 +0000902}
903
Neil Fuller61dabbf2018-10-21 22:53:18 +0100904// Used when compiling higher-level code against core.current.stubs.
905java_system_modules {
906 name: "core-current-stubs-system-modules",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100907 visibility: ["//visibility:public"],
Neil Fuller61dabbf2018-10-21 22:53:18 +0100908 libs: [
909 "core.current.stubs",
910 // This one is not on device but it's needed when javac compiles code
911 // containing lambdas.
912 "core-lambda-stubs-for-system-modules",
913 // This one is not on device but it's needed when javac compiles code
914 // containing @Generated annotations produced by some code generation
915 // tools.
916 // See http://b/123891440.
917 "core-generated-annotation-stubs",
918 ],
919}
920
Pete Gillin600c7cf2018-08-16 19:28:38 +0100921// Target for validating nullability annotations for correctness and
922// completeness. To check that there are no nullability errors:
923// make core-current-stubs-nullability-validation
924// To check that there are only the expected nullability warnings:
925// make core-current-stubs-nullability-validation-check-nullability-warnings
926// To update the the list of known expected nullability warnings:
927// make core-current-stubs-nullability-validation-update-nullability-warnings
928droidstubs {
929 name: "core-current-stubs-nullability-validation",
930 srcs: [":core_api_files"],
931 installable: false,
Paul Duffin419b2422019-06-25 15:42:05 +0100932 sdk_version: "none",
Pete Gillin600c7cf2018-08-16 19:28:38 +0100933 annotations_enabled: true,
934 args: "--hide-annotation libcore.api.Hide " +
935 "--validate-nullability-from-merged-stubs ",
936 merge_inclusion_annotations_dirs: ["ojluni-annotated-mmodule-stubs"],
937 merge_annotations_dirs: [
938 "metalava-manual",
939 // N.B. Stubs in this filegroup will be validated:
940 "ojluni-annotated-nullability-stubs",
941 ],
Pete Gillinc5f179b2018-11-14 18:42:19 +0000942 // The list of classes which have nullability annotations included in the source.
943 // (This is in addition to those which have annotations in the merged stubs.)
944 validate_nullability_from_list: "nullability_annotated_classes.txt",
Pete Gillin600c7cf2018-08-16 19:28:38 +0100945 // The expected set of warnings about missing annotations:
946 check_nullability_warnings: "nullability_warnings.txt",
947}
948
Neil Fullere784ef22018-11-16 15:54:30 +0000949// A host library containing time zone related classes. Used for
950// host-side tools and tests that have to deal with Android
951// time zone data.
952java_library_host {
953 name: "timezone-host",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100954 visibility: [
955 "//system/timezone/distro/core",
956 ],
Neil Fullere784ef22018-11-16 15:54:30 +0000957 srcs: [":timezone_host_files"],
958}
Andrei Onea24892e22019-04-16 16:48:37 +0100959
Victor Changb28d3f82019-08-09 16:24:46 +0100960// A library that contains annotations not retented in runtime and inline-able constants
961// that should not introduce any runtime dependency for compiling core libraries, e.g. core-icu4j,
962java_library {
963 name: "libcore-unsupportedappusage-annotation",
964 srcs: [
965 ":unsupportedappusage_annotation_files",
966 ],
967
968 installable: false,
969 sdk_version: "core_current",
970}
971
Andrei Onea24892e22019-04-16 16:48:37 +0100972// The source files that contain the UnsupportedAppUsage annotation and its dependencies.
973filegroup {
974 name: "unsupportedappusage_annotation_files",
Paul Duffinc241d6a2019-06-25 15:40:29 +0100975 visibility: [
976 "//frameworks/base",
977 ],
Andrei Onea24892e22019-04-16 16:48:37 +0100978 srcs: [
979 "dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java",
980 "dalvik/src/main/java/dalvik/system/VersionCodes.java",
981 "luni/src/main/java/libcore/api/CorePlatformApi.java",
982 "luni/src/main/java/libcore/api/IntraCoreApi.java",
983 ],
Neil Fuller86345d72019-04-25 09:15:32 +0100984}