Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 1 | // 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 | // |
| 16 | // Definitions for building the Java library and associated tests. |
| 17 | // |
| 18 | |
Neil Fuller | cf75688 | 2018-08-28 18:42:22 +0100 | [diff] [blame^] | 19 | // libcore has some sub-directories that follow a common structure: |
| 20 | // e.g. dalvik, dom, harmony-tests, json, jsr166-tests, luni, libart, ojluni, |
| 21 | // support, xml, xmlpull. |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 22 | // |
Neil Fuller | cf75688 | 2018-08-28 18:42:22 +0100 | [diff] [blame^] | 23 | // The structure of these is generally: |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 24 | // |
| 25 | // src/ |
| 26 | // main/ # To be shipped on every device. |
| 27 | // java/ # Java source for library code. |
Neil Fuller | cf75688 | 2018-08-28 18:42:22 +0100 | [diff] [blame^] | 28 | // native/ # C/C++ source for library code. |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 29 | // resources/ # Support files. |
| 30 | // test/ # Built only on demand, for testing. |
| 31 | // java/ # Java source for tests. |
Neil Fuller | cf75688 | 2018-08-28 18:42:22 +0100 | [diff] [blame^] | 32 | // native/ # C/C++ source for tests (rare). |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 33 | // resources/ # Support files. |
| 34 | // |
Neil Fuller | cf75688 | 2018-08-28 18:42:22 +0100 | [diff] [blame^] | 35 | // All subdirectories are optional. |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 36 | |
| 37 | build = [ |
| 38 | "openjdk_java_files.bp", |
| 39 | "non_openjdk_java_files.bp", |
| 40 | ] |
| 41 | |
| 42 | // The Java files and their associated resources. |
| 43 | core_resource_dirs = [ |
| 44 | "luni/src/main/java", |
| 45 | "ojluni/src/main/resources/", |
| 46 | ] |
| 47 | |
| 48 | java_defaults { |
| 49 | name: "libcore_java_defaults", |
| 50 | javacflags: [ |
| 51 | //"-Xlint:all", |
| 52 | //"-Xlint:-serial,-deprecation,-unchecked", |
| 53 | ], |
| 54 | dxflags: ["--core-library"], |
Andreas Gampe | 66b3173 | 2018-02-20 09:22:16 -0800 | [diff] [blame] | 55 | errorprone: { |
| 56 | javacflags: [ |
| 57 | "-Xep:MissingOverride:OFF", // Ignore missing @Override. |
Andreas Gampe | 24a2017 | 2018-06-13 11:28:45 -0700 | [diff] [blame] | 58 | "-Xep:ConstantOverflow:WARN", // Known constant overflow in SplittableRandom |
Andreas Gampe | 66b3173 | 2018-02-20 09:22:16 -0800 | [diff] [blame] | 59 | ], |
| 60 | }, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | // |
| 64 | // Build for the target (device). |
| 65 | // |
| 66 | |
| 67 | java_library { |
| 68 | name: "core-all", |
| 69 | defaults: ["libcore_java_defaults"], |
| 70 | |
| 71 | srcs: [ |
| 72 | ":openjdk_java_files", |
| 73 | ":non_openjdk_java_files", |
| 74 | ":android_icu4j_src_files", |
Neil Fuller | cf75688 | 2018-08-28 18:42:22 +0100 | [diff] [blame^] | 75 | ":core_simple_mmodule_java_files", |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 76 | ":openjdk_lambda_stub_files", |
| 77 | ], |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 78 | |
| 79 | no_standard_libs: true, |
| 80 | system_modules: "none", |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 81 | openjdk9: { |
| 82 | srcs: ["luni/src/module/java/module-info.java"], |
| 83 | javacflags: ["--patch-module=java.base=."], |
| 84 | }, |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 85 | |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 86 | java_resource_dirs: core_resource_dirs, |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 87 | java_resources: [":android_icu4j_resources"], |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 88 | |
| 89 | required: [ |
| 90 | "tzdata", |
| 91 | "tzlookup.xml", |
| 92 | ], |
| 93 | |
| 94 | installable: false, |
| 95 | } |
| 96 | |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 97 | java_system_modules { |
| 98 | name: "core-all-system-modules", |
| 99 | libs: ["core-all"], |
| 100 | } |
| 101 | |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 102 | java_library { |
| 103 | name: "core-oj", |
| 104 | defaults: ["libcore_java_defaults"], |
Colin Cross | 5b75cdd | 2018-06-27 11:00:13 -0700 | [diff] [blame] | 105 | installable: true, |
Colin Cross | bb180be | 2017-10-09 14:54:53 -0700 | [diff] [blame] | 106 | hostdex: true, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 107 | |
| 108 | srcs: [":openjdk_java_files"], |
| 109 | java_resource_dirs: core_resource_dirs, |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 110 | |
| 111 | no_standard_libs: true, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 112 | libs: ["core-all"], |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 113 | system_modules: "core-all-system-modules", |
| 114 | openjdk9: { |
| 115 | javacflags: ["--patch-module=java.base=."], |
| 116 | }, |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 117 | |
Pete Gillin | 7a7a6d2 | 2017-12-19 14:56:03 +0000 | [diff] [blame] | 118 | jacoco: { |
Pete Gillin | 27ca058 | 2018-01-10 17:04:17 +0000 | [diff] [blame] | 119 | exclude_filter: [ |
Pete Gillin | 3f59bad | 2018-01-30 11:20:29 +0000 | [diff] [blame] | 120 | "java.lang.Class", |
| 121 | "java.lang.Long", |
| 122 | "java.lang.Number", |
| 123 | "java.lang.Object", |
| 124 | "java.lang.String", |
| 125 | "java.lang.invoke.MethodHandle", |
| 126 | "java.lang.ref.Reference", |
| 127 | "java.lang.reflect.Proxy", |
Pete Gillin | b1868ada | 2018-01-17 11:03:10 +0000 | [diff] [blame] | 128 | "java.util.AbstractMap", |
Pete Gillin | 3f59bad | 2018-01-30 11:20:29 +0000 | [diff] [blame] | 129 | "java.util.HashMap", |
| 130 | "java.util.HashMap$Node", |
Pete Gillin | b1868ada | 2018-01-17 11:03:10 +0000 | [diff] [blame] | 131 | "java.util.Map", |
Pete Gillin | 7a7a6d2 | 2017-12-19 14:56:03 +0000 | [diff] [blame] | 132 | ], |
| 133 | }, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 134 | |
| 135 | notice: "ojluni/NOTICE", |
| 136 | |
| 137 | required: [ |
| 138 | "tzdata", |
| 139 | "tzlookup.xml", |
| 140 | ], |
Colin Cross | bb180be | 2017-10-09 14:54:53 -0700 | [diff] [blame] | 141 | |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | // Definitions to make the core library. |
| 145 | java_library { |
| 146 | name: "core-libart", |
| 147 | defaults: ["libcore_java_defaults"], |
Colin Cross | 5b75cdd | 2018-06-27 11:00:13 -0700 | [diff] [blame] | 148 | installable: true, |
Colin Cross | bb180be | 2017-10-09 14:54:53 -0700 | [diff] [blame] | 149 | hostdex: true, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 150 | |
| 151 | srcs: [ |
| 152 | ":non_openjdk_java_files", |
| 153 | ":android_icu4j_src_files", |
| 154 | ], |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 155 | java_resources: [":android_icu4j_resources"], |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 156 | |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 157 | no_standard_libs: true, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 158 | libs: ["core-all"], |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 159 | system_modules: "core-all-system-modules", |
| 160 | openjdk9: { |
| 161 | javacflags: ["--patch-module=java.base=."], |
| 162 | }, |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 163 | |
Pete Gillin | 80ebe87 | 2018-02-13 15:21:20 +0000 | [diff] [blame] | 164 | jacoco: { |
| 165 | exclude_filter: [ |
| 166 | "java.lang.DexCache", |
| 167 | "dalvik.system.ClassExt", |
| 168 | ], |
| 169 | }, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 170 | |
| 171 | required: [ |
| 172 | "tzdata", |
| 173 | "tzlookup.xml", |
| 174 | ], |
| 175 | } |
| 176 | |
Colin Cross | 3c6c2e2 | 2017-10-18 13:24:52 -0700 | [diff] [blame] | 177 | // A guaranteed unstripped version of core-oj and core-libart. |
| 178 | // The build system may or may not strip the core-oj and core-libart jars, |
| 179 | // but these will not be stripped. See b/24535627. |
| 180 | java_library { |
| 181 | name: "core-oj-testdex", |
Colin Cross | 5b75cdd | 2018-06-27 11:00:13 -0700 | [diff] [blame] | 182 | installable: true, |
Colin Cross | 3c6c2e2 | 2017-10-18 13:24:52 -0700 | [diff] [blame] | 183 | static_libs: ["core-oj"], |
| 184 | no_standard_libs: true, |
| 185 | libs: ["core-all"], |
| 186 | system_modules: "core-all-system-modules", |
| 187 | dxflags: ["--core-library"], |
Colin Cross | 485ed36 | 2017-12-05 17:24:22 -0800 | [diff] [blame] | 188 | dex_preopt: { |
| 189 | enabled: false, |
| 190 | }, |
Colin Cross | 3c6c2e2 | 2017-10-18 13:24:52 -0700 | [diff] [blame] | 191 | notice: "ojluni/NOTICE", |
| 192 | required: [ |
| 193 | "tzdata", |
| 194 | "tzlookup.xml", |
| 195 | ], |
| 196 | } |
| 197 | |
| 198 | java_library { |
| 199 | name: "core-libart-testdex", |
Colin Cross | 5b75cdd | 2018-06-27 11:00:13 -0700 | [diff] [blame] | 200 | installable: true, |
Colin Cross | 3c6c2e2 | 2017-10-18 13:24:52 -0700 | [diff] [blame] | 201 | static_libs: ["core-libart"], |
| 202 | no_standard_libs: true, |
| 203 | libs: ["core-all"], |
| 204 | system_modules: "core-all-system-modules", |
| 205 | dxflags: ["--core-library"], |
Colin Cross | 485ed36 | 2017-12-05 17:24:22 -0800 | [diff] [blame] | 206 | dex_preopt: { |
| 207 | enabled: false, |
| 208 | }, |
Colin Cross | 3c6c2e2 | 2017-10-18 13:24:52 -0700 | [diff] [blame] | 209 | notice: "ojluni/NOTICE", |
| 210 | required: [ |
| 211 | "tzdata", |
| 212 | "tzlookup.xml", |
| 213 | ], |
| 214 | } |
| 215 | |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 216 | // A library that exists to satisfy javac when |
| 217 | // compiling source code that contains lambdas. |
| 218 | java_library { |
| 219 | name: "core-lambda-stubs", |
| 220 | defaults: ["libcore_java_defaults"], |
| 221 | |
| 222 | srcs: [ |
| 223 | ":openjdk_lambda_stub_files", |
| 224 | ":openjdk_lambda_duplicate_stub_files", |
| 225 | ], |
| 226 | |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 227 | no_standard_libs: true, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 228 | libs: ["core-all"], |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 229 | system_modules: "core-all-system-modules", |
| 230 | openjdk9: { |
| 231 | javacflags: ["--patch-module=java.base=."], |
| 232 | }, |
Colin Cross | af0b54c | 2017-09-27 17:22:32 -0700 | [diff] [blame] | 233 | |
| 234 | notice: "ojluni/NOTICE", |
| 235 | |
| 236 | installable: false, |
| 237 | include_srcs: true, |
| 238 | } |
Colin Cross | a4d9fc4 | 2017-09-29 18:04:37 -0700 | [diff] [blame] | 239 | |
| 240 | java_system_modules { |
| 241 | name: "core-system-modules", |
| 242 | libs: [ |
| 243 | "core-oj", |
| 244 | "core-libart", |
| 245 | "core-lambda-stubs", |
| 246 | ], |
| 247 | } |
Colin Cross | 3c6c2e2 | 2017-10-18 13:24:52 -0700 | [diff] [blame] | 248 | |
| 249 | // Build libcore test rules |
| 250 | java_library_static { |
| 251 | name: "core-test-rules", |
| 252 | hostdex: true, |
| 253 | no_framework_libs: true, |
| 254 | srcs: [ |
| 255 | "dalvik/test-rules/src/main/**/*.java", |
| 256 | "test-rules/src/main/**/*.java", |
| 257 | ], |
| 258 | static_libs: ["junit"], |
| 259 | } |
| 260 | |
| 261 | // Make the core-tests-support library. |
| 262 | java_library_static { |
| 263 | name: "core-tests-support", |
| 264 | hostdex: true, |
| 265 | no_framework_libs: true, |
| 266 | srcs: ["support/src/test/java/**/*.java"], |
| 267 | libs: [ |
| 268 | "junit", |
| 269 | "bouncycastle", |
| 270 | ], |
| 271 | static_libs: [ |
| 272 | "bouncycastle-bcpkix", |
| 273 | "bouncycastle-ocsp", |
| 274 | ], |
| 275 | } |
| 276 | |
| 277 | // Make the jsr166-tests library. |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 278 | java_test { |
Colin Cross | 3c6c2e2 | 2017-10-18 13:24:52 -0700 | [diff] [blame] | 279 | name: "jsr166-tests", |
| 280 | srcs: ["jsr166-tests/src/test/java/**/*.java"], |
| 281 | no_framework_libs: true, |
| 282 | libs: [ |
| 283 | "junit", |
| 284 | ], |
| 285 | } |
Nan Zhang | 65f27a3 | 2018-01-05 10:41:46 -0800 | [diff] [blame] | 286 | |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 287 | // Build a library just containing files from luni/src/test/filesystems for use in tests. |
| 288 | java_library { |
| 289 | name: "filesystemstest", |
| 290 | compile_dex: true, |
| 291 | srcs: ["luni/src/test/filesystems/src/**/*.java"], |
| 292 | java_resource_dirs: ["luni/src/test/filesystems/resources"], |
| 293 | no_framework_libs: true, |
| 294 | errorprone: { |
| 295 | javacflags: ["-Xep:MissingOverride:OFF"], |
| 296 | }, |
| 297 | } |
| 298 | |
| 299 | // Build a library just containing files from luni/src/test/parameter_metadata for use in tests. |
| 300 | java_library { |
| 301 | name: "parameter-metadata-test", |
| 302 | compile_dex: true, |
| 303 | srcs: ["luni/src/test/parameter_metadata/src/**/*.java"], |
| 304 | no_framework_libs: true, |
| 305 | javacflags: ["-parameters"], |
| 306 | errorprone: { |
| 307 | javacflags: ["-Xep:MissingOverride:OFF"], |
| 308 | }, |
| 309 | } |
| 310 | |
| 311 | // Make the core-tests library. |
| 312 | java_test { |
| 313 | name: "core-tests", |
| 314 | defaults: ["libcore_java_defaults"], |
| 315 | hostdex: true, |
Roland Levillain | 5e028a2 | 2018-08-17 17:33:59 +0100 | [diff] [blame] | 316 | no_framework_libs: true, |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 317 | srcs: [ |
| 318 | "dalvik/src/test/java/**/*.java", |
| 319 | "dalvik/test-rules/src/test/java/**/*.java", |
| 320 | "dom/src/test/java/**/*.java", |
| 321 | "harmony-tests/src/test/java/**/*.java", |
| 322 | "json/src/test/java/**/*.java", |
| 323 | "luni/src/test/java/**/*.java", |
| 324 | "xml/src/test/java/**/*.java", |
| 325 | ], |
| 326 | exclude_srcs: [ |
| 327 | "luni/src/test/java/libcore/java/util/zip/Zip64Test.java", |
| 328 | "luni/src/test/java/libcore/java/util/zip/Zip64FileTest.java", |
| 329 | ], |
| 330 | |
| 331 | java_resource_dirs: [ |
| 332 | "*/src/test/java", |
| 333 | "*/src/test/resources", |
| 334 | ], |
| 335 | exclude_java_resource_dirs: [ |
| 336 | "ojluni/src/test/java", |
| 337 | "ojluni/src/test/resources", |
| 338 | ], |
| 339 | |
| 340 | java_resources: [ |
| 341 | ":filesystemstest", |
| 342 | ":parameter-metadata-test", |
| 343 | ], |
| 344 | |
| 345 | libs: [ |
| 346 | "okhttp", |
| 347 | "bouncycastle", |
| 348 | ], |
| 349 | static_libs: [ |
| 350 | "archive-patcher", |
| 351 | "core-test-rules", |
| 352 | "core-tests-support", |
| 353 | "junit-params", |
| 354 | "mockftpserver", |
| 355 | "mockito-target", |
| 356 | "mockwebserver", |
| 357 | "nist-pkix-tests", |
| 358 | "slf4j-jdk14", |
| 359 | "sqlite-jdbc", |
| 360 | "tzdata-testing", |
| 361 | ], |
| 362 | |
| 363 | errorprone: { |
| 364 | javacflags: [ |
| 365 | "-Xep:TryFailThrowable:ERROR", |
| 366 | "-Xep:ComparisonOutOfRange:ERROR", |
| 367 | ], |
| 368 | }, |
| 369 | } |
| 370 | |
| 371 | // Make the core-ojtests library. |
| 372 | java_test { |
| 373 | name: "core-ojtests", |
| 374 | defaults: ["libcore_java_defaults"], |
| 375 | hostdex: true, |
Roland Levillain | 5e028a2 | 2018-08-17 17:33:59 +0100 | [diff] [blame] | 376 | no_framework_libs: true, |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 377 | |
| 378 | srcs: [ |
| 379 | "ojluni/src/test/java/**/*.java", |
| 380 | ], |
| 381 | java_resource_dirs: [ |
| 382 | "ojluni/src/test/java", |
| 383 | "ojluni/src/test/resources", |
| 384 | ], |
| 385 | libs: [ |
| 386 | "okhttp", |
| 387 | "bouncycastle", |
| 388 | ], |
| 389 | static_libs: ["testng"], |
| 390 | |
| 391 | // ojluni/src/test/java/util/stream/{bootlib,boottest} |
| 392 | // contains tests that are in packages from java.base; |
| 393 | // By default, OpenJDK 9's javac will only compile such |
| 394 | // code if it's declared to also be in java.base at |
| 395 | // compile time. |
| 396 | // |
| 397 | // For now, we use --patch-module to put all sources |
| 398 | // and dependencies from this make target into java.base; |
| 399 | // other source directories in this make target are in |
| 400 | // packages not from java.base; if this becomes a problem |
| 401 | // in future, this could be addressed eg. by splitting |
| 402 | // boot{lib,test} out into a separate make target, |
| 403 | // deleting those tests or moving them to a different |
| 404 | // package. |
| 405 | patch_module: "java.base", |
| 406 | } |
| 407 | |
| 408 | // Make the core-ojtests-public library. Excludes any private API tests. |
| 409 | java_test { |
| 410 | name: "core-ojtests-public", |
| 411 | defaults: ["libcore_java_defaults"], |
Roland Levillain | 5e028a2 | 2018-08-17 17:33:59 +0100 | [diff] [blame] | 412 | no_framework_libs: true, |
Colin Cross | ec80f4f | 2018-08-15 21:17:11 -0700 | [diff] [blame] | 413 | srcs: [ |
| 414 | "ojluni/src/test/java/**/*.java", |
| 415 | ], |
| 416 | // Filter out the following: |
| 417 | // 1.) DeserializeMethodTest and SerializedLambdaTest, because they depends on stub classes |
| 418 | // and won't actually run, and |
| 419 | // 2.) util/stream/boot*. Those directories contain classes in the package java.util.stream; |
| 420 | // excluding them means we don't need patch_module: "java.base" |
| 421 | exclude_srcs: [ |
| 422 | "**/DeserializeMethodTest.java", |
| 423 | "**/SerializedLambdaTest.java", |
| 424 | "ojluni/src/test/java/util/stream/boot*/**/*", |
| 425 | ], |
| 426 | java_resource_dirs: [ |
| 427 | "ojluni/src/test/java", |
| 428 | "ojluni/src/test/resources", |
| 429 | // Include source code as part of JAR |
| 430 | "ojluni/src/test/dist", |
| 431 | ], |
| 432 | libs: [ |
| 433 | "bouncycastle", |
| 434 | "okhttp", |
| 435 | "testng", |
| 436 | ], |
| 437 | } |
| 438 | |
Pete Gillin | 7db7faa | 2018-07-31 13:29:35 +0100 | [diff] [blame] | 439 | // Make the annotated stubs in ojluni/annotations available to metalava: |
| 440 | droiddoc_exported_dir { |
| 441 | name: "ojluni-annotated-stubs", |
| 442 | path: "ojluni/annotations", |
| 443 | } |
| 444 | |
Nan Zhang | 3824a82 | 2018-03-21 21:41:02 +0000 | [diff] [blame] | 445 | // |
| 446 | // Local droiddoc for faster libcore testing |
| 447 | // |
| 448 | // Run with: |
| 449 | // mm -j32 core-docs |
| 450 | // |
| 451 | // Main output: |
Pete Gillin | cfd6db7 | 2018-08-13 16:35:18 +0100 | [diff] [blame] | 452 | // ../out/soong/.intermediates/libcore/core-docs/android_common/out/reference/packages.html |
Nan Zhang | 3824a82 | 2018-03-21 21:41:02 +0000 | [diff] [blame] | 453 | // |
| 454 | // All text for proofreading (or running tools over): |
| 455 | // ../out/soong/.intermediates/libcore/core-docs/android_common/core-docs-proofread.txt |
| 456 | // |
| 457 | // TODO list of missing javadoc, etc: |
Pete Gillin | cfd6db7 | 2018-08-13 16:35:18 +0100 | [diff] [blame] | 458 | // ../out/soong/.intermediates/libcore/core-docs/android_common/out/core-docs-todo.html |
Nan Zhang | 3824a82 | 2018-03-21 21:41:02 +0000 | [diff] [blame] | 459 | // |
Nan Zhang | 65f27a3 | 2018-01-05 10:41:46 -0800 | [diff] [blame] | 460 | droiddoc { |
| 461 | name: "core-docs", |
| 462 | srcs: [ |
| 463 | ":openjdk_javadoc_files", |
| 464 | ":non_openjdk_javadoc_files", |
| 465 | ":android_icu4j_src_files_for_docs", |
Nan Zhang | 65f27a3 | 2018-01-05 10:41:46 -0800 | [diff] [blame] | 466 | ], |
Dan Willemsen | f2b0458 | 2018-02-26 14:36:32 -0800 | [diff] [blame] | 467 | custom_template: "droiddoc-templates-sdk", |
Nan Zhang | 65f27a3 | 2018-01-05 10:41:46 -0800 | [diff] [blame] | 468 | hdf: [ |
| 469 | "android.whichdoc offline", |
| 470 | ], |
| 471 | knowntags: [ |
| 472 | "known_oj_tags.txt", |
| 473 | ], |
| 474 | proofread_file: "core-docs-proofread.txt", |
| 475 | todo_file: "core-docs-todo.html", |
Nan Zhang | 68c55b4 | 2018-08-21 17:31:51 +0000 | [diff] [blame] | 476 | metalava_enabled: true, |
| 477 | args: " --exclude-annotations --generate-documentation -offlinemode -title \"libcore\"", |
Nan Zhang | 65f27a3 | 2018-01-05 10:41:46 -0800 | [diff] [blame] | 478 | } |
Nan Zhang | d55722b | 2018-02-27 15:08:20 -0800 | [diff] [blame] | 479 | |
Nan Zhang | b151076 | 2018-06-22 10:49:18 -0700 | [diff] [blame] | 480 | droiddoc { |
| 481 | name: "metalava-dokka-core-docs", |
| 482 | srcs: [ |
| 483 | ":openjdk_javadoc_files", |
| 484 | ":non_openjdk_javadoc_files", |
| 485 | ":android_icu4j_src_files_for_docs", |
Nan Zhang | b151076 | 2018-06-22 10:49:18 -0700 | [diff] [blame] | 486 | ], |
| 487 | metalava_enabled: true, |
| 488 | dokka_enabled: true, |
| 489 | args: "--generate-documentation" |
| 490 | } |
| 491 | |
Nan Zhang | d55722b | 2018-02-27 15:08:20 -0800 | [diff] [blame] | 492 | filegroup { |
| 493 | name: "known-oj-tags", |
| 494 | srcs: [ |
| 495 | "known_oj_tags.txt", |
| 496 | ], |
| 497 | } |
Nan Zhang | 602fc0e | 2018-03-22 16:14:22 -0700 | [diff] [blame] | 498 | |
| 499 | droiddoc { |
| 500 | name: "core-current-stubs-gen-docs", |
| 501 | srcs: [ |
| 502 | ":openjdk_javadoc_files", |
| 503 | ":non_openjdk_javadoc_files", |
| 504 | ":android_icu4j_src_files_for_docs", |
Nan Zhang | 602fc0e | 2018-03-22 16:14:22 -0700 | [diff] [blame] | 505 | ], |
Nan Zhang | 602fc0e | 2018-03-22 16:14:22 -0700 | [diff] [blame] | 506 | installable: false, |
| 507 | no_framework_libs: true, |
Nan Zhang | 68c55b4 | 2018-08-21 17:31:51 +0000 | [diff] [blame] | 508 | metalava_enabled: true, |
| 509 | args: " --exclude-annotations", |
Nan Zhang | 602fc0e | 2018-03-22 16:14:22 -0700 | [diff] [blame] | 510 | } |
| 511 | |
| 512 | java_library_static { |
| 513 | name: "core.current.stubs", |
| 514 | srcs: [ |
| 515 | ":core-current-stubs-gen-docs", |
| 516 | ], |
| 517 | errorprone: { |
| 518 | javacflags: [ |
| 519 | "-Xep:MissingOverride:OFF", |
| 520 | ], |
| 521 | }, |
Tobias Thierer | 496a938 | 2018-06-12 14:09:11 +0100 | [diff] [blame] | 522 | openjdk9: { |
| 523 | javacflags: ["--patch-module=java.base=."], |
| 524 | }, |
Nan Zhang | 602fc0e | 2018-03-22 16:14:22 -0700 | [diff] [blame] | 525 | no_standard_libs: true, |
| 526 | system_modules: "none", |
| 527 | } |
Neil Fuller | cf75688 | 2018-08-28 18:42:22 +0100 | [diff] [blame^] | 528 | |
| 529 | // |
| 530 | // Targets related to core mmodule APIs / dependencies. |
| 531 | // |
| 532 | |
| 533 | // Generates stub source files for the {public SDK API + intra-core mmodule API} |
| 534 | // of core-all. |
| 535 | droiddoc { |
| 536 | name: "core-all-mmodule-stubs-docs", |
| 537 | srcs: [ |
| 538 | ":openjdk_javadoc_files", |
| 539 | ":non_openjdk_javadoc_files", |
| 540 | ":android_icu4j_src_files_for_docs", |
| 541 | ":core_simple_mmodule_java_files", |
| 542 | ], |
| 543 | |
| 544 | installable: false, |
| 545 | no_framework_libs: true, |
| 546 | metalava_enabled: true, |
| 547 | args: "-nodocs -stubsourceonly -showAnnotation libcore.mmodule.IntraCoreMModuleApi", |
| 548 | } |
| 549 | |
| 550 | // A library containing the {public SDK API + intra-core mmodule API} stubs for |
| 551 | // core-all. |
| 552 | java_library { |
| 553 | name: "core-all.mmodule.stubs", |
| 554 | srcs: [ |
| 555 | ":core-all-mmodule-stubs-docs", |
| 556 | ], |
| 557 | no_framework_libs: true, |
| 558 | |
| 559 | no_standard_libs: true, |
| 560 | libs: ["core-all"], |
| 561 | system_modules: "core-all-system-modules", |
| 562 | openjdk9: { |
| 563 | javacflags: ["--patch-module=java.base=."], |
| 564 | }, |
| 565 | } |