summaryrefslogtreecommitdiff
path: root/JavaLibrary.bp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "Stop frameworks/base from accessing annotation source files"Paul Duffin2019-10-101-12/+15
|\ \
| * | Stop frameworks/base from accessing annotation source filesPaul Duffin2019-10-101-12/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds an art.module.api.annotations that frameworks/base can use instead of the unsupportedappusage_annotation_files filegroup. Also, does some internal cleanup. * Moves the definition of the filegroup(s) into non_openjdk_java_files.bp alongside the rest. * Stops duplicating paths to the various files. * Renames the internal target to make it clearer what it contains. Bug: 142113521 Test: m java Change-Id: I059652d4bb3085da0b975fa8cbd05dd16e16654f
* / Fix build failure when OUT_DIR is outside ANDROID_BUILD_TOPPaul Duffin2019-10-101-20/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | Caused by use of --patch-module=java.base=. where . means current directory, i.e. build top. When there are some sources outside the current directory, such as generated stubs source from external/icu, then it fails because sources outside are not patched in. Similar behavior is seen when OUT_DIR_COMMON_BASE is outside the top directory. Using patch_module: "java.base" causes Soong to add --patch-module=java.base=<paths to each source root> Which means that it works correctly irrespective of where the sources are. Using an OUT_DIR outside top does increase the length of command lines, presumably because it prevents paths being relativized against ANDROID_BUILD_TOP. So, using a short OUT_DIR path is required otherwise some targets fail with argument list too long errors. However, that issue is orthogonal to this and only mentioned because it came up during testing of this fix. Bug: 142397121 Test: OUT_DIR=<path-outside-top> m java Change-Id: Idb2826d58818cd33be8054418006bbbac513be5e
* Add placeholder for core library public stubs sourcePaul Duffin2019-10-091-0/+21
| | | | | | | | | Is currently empty but will be incrementally updated to add the stubs source from each of the ART, Conscrypt and I18N modules. Bug: 142113521 Test: m checkbuild Change-Id: I72ebbfb427f856e712c7bf6b4662d6d347771dc4
* Remove unnecessary dependency on android_icu4j_resources_libPaul Duffin2019-10-081-1/+0
| | | | | | | | | The core-all target is only used for building and is never actually executed so there is no need for it to include icu4j resources. Bug: 141683101 Test: m checkbuild Change-Id: I89f7c7737cc547d6fa79fb5928f1b8fa0fec9554
* Remove unused core_api_files filegroupPaul Duffin2019-10-081-16/+0
| | | | | | Test: m checkbuild Bug: 141613583 Change-Id: I9c9df60dcd15ce88316df4dc0a0d68eb967d6123
* Fix java 9 failure when building libcore-unsupportedappusage-annotationPaul Duffin2019-10-071-4/+11
| | | | | Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true m javac-check Change-Id: Ied79f86ba9de1dedfd25dfde57cb12d24036eb38
* Build core-all using i18n module intra core apiPaul Duffin2019-10-051-1/+4
| | | | | | | | | | | | Requires some additional entries to be added to the i18n intra core api. Remove core-libart-oj.depscheck as it is no longer required because core-all builds against the i18n intra core api now. Bug: 141683101 Test: m checkbuild Change-Id: I04215b461f1c69773371253bc9a45b29ae28ad0d
* Merge "Add ICU.getICUVersion() to intra core api for android_icu4j_tests"Treehugger Robot2019-10-041-1/+0
|\
| * Add ICU.getICUVersion() to intra core api for android_icu4j_testsPaul Duffin2019-10-041-1/+0
| | | | | | | | | | | | Bug: 141683101 Test: m checkbuild Change-Id: I2227e2541bc8ddd79b6dd23576fd43c09ff86e22
* | Fix an incorrect comment in JavaLibrary.bp.Pete Gillin2019-10-041-2/+2
|/ | | | | | | | | | The procedure for updating the nullability warnings file changed during the review of https://r.android.com/801554 but this comment was not updated to reflect that. Test: n/a (only affects comments) Fixes: 142060419 Change-Id: Iaa603cad40a5aac91931662dcefb665a447bd836
* Allow bouncycastle to build against art module public APIPaul Duffin2019-10-041-5/+13
| | | | | | | | | | | | | Adding the libcore-unsupportedappusage-annotation to the art-module-public-api-stubs-system-modules makes the CorePlatformApi, IntraCoreApi and UnsupportedAppUsage annotations available for core libraries that can build against the art module public API without having to make the libcore-unsupportedappusage-annotation library externally visible. Bug: 141613583 Test: m checkbuild Change-Id: I0d29e4370bd5228a54794c64e3c15101fbef6576
* Remove ICU and Conscrypt source from nullability validationPaul Duffin2019-10-031-5/+5
| | | | | | | | | | | | | | | | | | | The core-current-stubs-nullability-validation rule runs on source from I18N and Conscrypt modules as well as the ART module. That prevents unbundling. However, it seems as though no nullability checks are actually performed on the I18N and Conscrypt code so removing them will not reduce the effectiveness of the checks. Renamed the rule to art-module-public-api-stubs-nullability-validation which more accurately reflects what it is doing. Also, replaced "make ...." with "m ..." in the comments as use of make was previously deprecated. Bug: 141613583 Bug: 142060419 Test: m Change-Id: I6340356ef7a1f877e1fdf03dc812d092809b6357
* Split intra core API into Conscrypt, ART, I18N modulesPaul Duffin2019-10-031-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extracts art_module_api_files filegroup from core_api_files to just contain the files provided by the ART module. Adds droidstubs and java_library definitions to generate the stubs sources and compile them for each of the art, conscrypt and i18n modules. Also adds a java_system_modules definition for art module intra core api stubs to allow it to be used to build the i18n and conscrypt libraries. Removes generation of core-intra-stubs and instead builds core.intra.stubs from the module specific libraries. The art module reuses the API specification files (e.g. mmodules/intracoreapi/api/intra/current-api.txt, the other modules have their own directory. The changes have been made in here to make reviewing easier. However, the intent is that the i18n and conscrypt build rules and API specification files will be moved to external/icu and external/conscrypt respectively in a follow up change. The core-libart-oj.depscheck build module has been modified to be more consistent with core-all and consequently has to use the i18n stubs source due to limitations with javac. A follow up change will switch core-all over to build against i18n stubs source at which point this will become unnecessary and will be removed. Test: m checkbuild Bug: 141935400 Change-Id: I8d820c0303614939ff8a042ba4f75511bebcdbe7
* Merge "external/conscrypt no longer uses core-all-system-modules"Treehugger Robot2019-10-021-1/+0
|\
| * external/conscrypt no longer uses core-all-system-modulesPaul Duffin2019-10-021-1/+0
| | | | | | | | | | Test: m checkbuild Change-Id: Ib732c9567aecb96b5267a162b74ce6f4d16d365a
* | Merge "Remove unnecessary usages of core-all and restrict its visibility"Treehugger Robot2019-10-021-15/+14
|\|
| * Remove unnecessary usages of core-all and restrict its visibilityPaul Duffin2019-10-021-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core-all library is not required for generating the core-intra-stubs or for compiling them so this change removes the reference to them from the build modules and also switches core.intra.stubs from system_modules: "core-all-system-modules" to system_modules: "none". All other accesses to core-all is done via the core-all-system-modules which means that core-all can use the package default visibility of private. The core_all_visibility variable (along with its comment) was inlined into the only module that references it. Test: m checkbuild Change-Id: I4703239567acf34354dae8b11b001d49b6672b66
* | Move conscrypt.module...stubs to external/conscryptPaul Duffin2019-10-011-29/+2
|/ | | | | | Test: m checkbuild Bug: 141742596 Change-Id: I38a6392db396a748655cb73f0defcdffe9aea885
* Move core-icu4j, core-icu4j-testdex and i18n.module... to external/icuPaul Duffin2019-09-301-69/+9
| | | | | | Bug: 141683101 Test: m checkbuild Change-Id: I030955a63c401fbb290e4686bf737fccd8052e57
* Merge changes from topics "bug136256059_attempt2", "bug136256059_builder"Tobias Thierer2019-09-301-2/+0
|\ | | | | | | | | | | * changes: Make MimeMap final and introduce MimeMap.Builder. Move default MimeMap implementation to frameworks.
| * Move default MimeMap implementation to frameworks.Tobias Thierer2019-09-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the second attempt to submit this CL. The first attempt regressed on app startup because RuntimeInit installed the custom MimeMap from commonInit() which runs post-fork of the zygote, but that was fixed by installing it pre-fork. This CL topic moves the default MimeMap implementation to frameworks. Libcore starts with a minimal implementation sufficient to pass CtsLibcoreTestCases, but frameworks can inject the real implementation. Before this CL topic, the data files and logic (MimeMapImpl) were part of core-*.jar on device; after this CL, they instead live in framework.jar. Tests from MimeMapTest that check behavior of that default implementation also move to a non-libcore CTS test. Planned work for follow-up CL: 1. Make CTS more opinionated, with a plan to assert that all of the default mappings are present. How exactly the expectated mapping will be bundled in CTS is still TBD. 2. Add a vendor.mime.types file (defaults to empty) where vendors can add additional mappings; I plan to make it such that mappings in that file are parsed last but never override any earlier mappings, as if each mime type / file extension was prefixed with '?'. 3. Perhaps enforce that public APIs android.webkit.MimeTypeMap and java.net.URLConnection.getFileNameMap() behave consistently with MimeMap.getDefault(). Test: atest CtsLibcoreTestCases Test: atest CtsMimeMapTestCases Test: Checked that CtsLibcoreTestCases still passes on a build that is missing the MimeMap.setDefault() call from RuntimeInit.java. Test: Checked that app startup time does not regress as part of this CL topic - see http://b/136256059#comment17 Bug: 136256059 Change-Id: I54103f0e1b83bdca5e083b1968ccb50421b94748
* | Remove unnecessary use of --patch-modulePaul Duffin2019-09-271-9/+0
| | | | | | | | | | Test: m javac-check with and without EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true Change-Id: I2a99fa91065d6aedf1ea8e4a36e1222b9b313e1a
* | Merge "Remove unused core-system-modules"Paul Duffin2019-09-271-33/+2
|\ \
| * | Remove unused core-system-modulesPaul Duffin2019-09-271-33/+2
| |/ | | | | | | | | | | Bug: 141613583 Test: m checkbuild Change-Id: If0b15e227c167596beba6f29a33f2364fe67008f
* / Fix java 9 build breakage caused by splitting core.current.stubsPaul Duffin2019-09-271-11/+2
|/ | | | | | | | | | | | | | | | | | Needed to change system_modules from "none" to "art-module-public-api-stubs-system-modules" to make sure that the java.lang classes are available. Affected both the conscrypt and i18n module stubs. Also needed to remove the --patch-module from core-icu4j as it somehow prevented the external/icu4j/android_icu4j source from seeing the classes in libcore-unsupportedappusage-annotation. Reproduced the problem as described in test, made the change and then verified that problem was fixed. Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true m javac-check Change-Id: I3d76c9c4569a4f40c2ab804210cd24f96a515038
* Split core_current into separate module specific APIsPaul Duffin2019-09-261-16/+122
| | | | | | | | | | | | | Instead of creating core_current stubs directly from the source for libcore, ICU and conscrypt this creates separate stubs libraries for each and then creates the core_current by combining them together. The new stubs libraries are named after the mainline module to which they belong. Test: m checkbuild Bug: 141613583 Change-Id: I0f84ba5c5ed3754cbbeb7761523fc6b7a9681359
* Add TestRule to enable access to deprecated BC algorithmsPaul Duffin2019-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Android restricts access to a number of deprecated BouncyCastle algorithms to APKs that target SDK version <= 27. However, those algorithms still need testing. Rather than set the target SDK version to be <= 27 (which could have other side effects) tests use Providers.setMaximumAllowableApiLevelForBcDeprecation(int) to raise the level to make them accessible at the current target SDK version and resets it the default value afterwards. This change adds a JUnit test rule to implement that behavior and uses it to replace duplicate setUp() and tearDown() code across a number of tests. It also insulates the tests from having to access the internal sun.security.jca.Providers and dalvik.system.VMRuntime classes. This is intended to be used by external/conscrypt so that the conscrypt-tests module can stop depending on core-all-systems-module. Bug: 141539296 Test: atest CtsLibcoreTestCases Change-Id: If41b5c221c392e9b6d14d500537115d3380c4999
* Remove duplicate libraries that are provided by system modulesPaul Duffin2019-09-201-17/+4
| | | | | | | | | | | | An improvement in the Soong build means that it is no longer necessary to duplicate the libraries that it provides. This change removes the duplicates and moves the system_modules property next to sdk_version property to be consistent and because those properties are tightly coupled. Bug: 141359858 Test: m checkbuild Change-Id: Ifaa9ece8624e569c522a92d8ed0b5e8b23bb2551
* Make core.current.stubs a proper subset of android.jarPaul Duffin2019-09-191-4/+3
| | | | | | | | | | | | | | | Previously, this was built against a different set of classes than the core library contributed to the android.jar and so there were some differences. 1) Some com.android.org.conscrypt annotation classes were accidentally exposed due to a bug in the currysrc code that meant it did not process annotations. 2) The android.net.ssl classes provided by conscrypt were not present because that are in a separate conscrypt_public_api_files filegroup which was not supplied to droidstubs Test: m checkbuild and check stubs output Change-Id: If41a101c8dc5ccd9ec9fe336cc0108401fb693c0
* Remove prefix property from platform_compat_config moduleatrost2019-08-291-1/+0
| | | | | | | | | It's no longer needed as the configs moved to their own directory. Bug: 140074769 Bug: 140092095 Test: m Change-Id: I040b49a1173b47f4f99a8c6a45da68be7f2fef6a
* Revert "Move default MimeMap implementation to frameworks."Tobias Thierer2019-08-281-0/+2
| | | | | | | | This reverts commit d9e06a7351c25bf3275cffc382e3e7f8c87e6079. Reason for revert: Caused slower app startup (I don't know why). Change-Id: I7865dd97ee202e26236498505af3d746143f74e4
* Move default MimeMap implementation to frameworks.Tobias Thierer2019-08-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL topic moves the default MimeMap implementation to frameworks. Libcore starts with a minimal implementation sufficient to pass CtsLibcoreTestCases, but frameworks can inject the real implementation. Before this CL topic, the data files and logic (MimeMapImpl) were part of core-*.jar on device; after this CL, they instead live in framework.jar. Tests from MimeMapTest that check behavior of that default implementation also move to a non-libcore CTS test. Planned work for follow-up CL: 1. Make CTS more opinionated, with a plan to assert that all of the default mappings are present. How exactly the expectated mapping will be bundled in CTS is still TBD. 2. Add a vendor.mime.types file (defaults to empty) where vendors can add additional mappings; I plan to make it such that mappings in that file are parsed last but never override any earlier mappings, as if each mime type / file extension was prefixed with '?'. 3. Perhaps enforce that public APIs android.webkit.MimeTypeMap and java.net.URLConnection.getFileNameMap() behave consistently with MimeMap.getDefault(). Test: atest CtsLibcoreTestCases Test: atest CtsMimeMapTestCases Test: Checked that CtsLibcoreTestCases still passes on a build that is missing the MimeMap.setDefault() call from RuntimeInit.java. Bug: 136256059 Change-Id: I1621bd2907d5923a19541e3e859238c46187f8df
* Build core-icu4j against core-current sdkVictor Chang2019-08-161-5/+22
| | | | | | | | | | | We use core_current when compiling core-icu4j but we could depend on core.intra.stub (a superset of core_current) instead if there were internal APIs we wanted to use from ICU4J. It is important that core-icu4j is restricted to only use APIs that core-libart and core-oj consider stable since they are in a different APEX module that can be updated independently. Bug: 138994281 Test: m droid Change-Id: I72e5d9d5ba52049202a594a2b8a5ffb97490a604
* Define @IntraCoreApi between libcore and icu4jVictor Chang2019-08-121-2/+2
| | | | | | | | | | - Adds @IntraCoreApi all ICU4J API cuurently used by libcore - It locks down to a set of @IntraCoreApi APIs and we can reduce the set size later. Bug: 138994281 Test: m droid Change-Id: I23e0b826306b418382e49a9ed1dfd2c3cd180d36
* Separate icu4j from core-libartVictor Chang2019-08-091-7/+43
| | | | | | | | Introduce new core-icu4j java_library Bug: 138994281 Test: CtsLibcoreTestCases Change-Id: Iba131bb79e778f1a9c12a1b81e82f2c1a96658d1
* Upload platform compat config generated from core-all target.atrost2019-08-051-0/+8
| | | | | | | | | | | Add compat-changeid-annotation-processor and upload the generated compat config using the platform_compat_config rule. Test: flashed device locally, config files found and read by com.android.server.compat.CompatConfig. Bug: 138222363 Change-Id: I6572c8442cfdd82d31bf68f57934cd8b56e3bb46
* Use external/mime-support's mime.types rather than libcore's copy.Tobias Thierer2019-08-011-2/+1
| | | | | | | | | | | | | | | | | | | | Libcore was carrying a copy of mime.types that is now also present in external/mime-support, and exposed through a filegroup in another CL in this CL topic. Because external/mime-support's filegroup carries the file in the root level rather than in the libcore/net/ subdirectory, this CL updates MimeMap.java accordingly. libcore's mime.types and the associated README are now redundant, so this CL drops them. Bug: 135431432 Test: Checked that libcore's and external/mime-support's mime.types were exactly identical before this CL: diff {libcore/luni/src/main/java/libcore/net,external/mime-support}/mime.types Test: atest CtsLibcoreTestCases:libcore.libcore.net.MimeMapTest Change-Id: I632d2977f6588d92177cf059d3c048e07c38f341
* libcore: java_resource_dirs -> java_resourcesTobias Thierer2019-08-011-5/+31
| | | | | | | | | | | | | | | | | | | | | Before this CL, core resources were included via java_resource_dirs. This makes it difficult to add additional individual files / filegroups from elsewhere (needed for bug 135431432). This CL uses java_resources instead. Because the luni/ resources are currently mixed-in with .java source files, whereas ojluni/ resources are in their own resources/ subdirectory, this CL lists the luni resource paths explicitly but uses a glob to collect the ojluni/ resources. I have a separate draft CL to move the luni resources to a resources/ subdirectory, but am not yet sure whether I should upload it for review. Bug: 135431432 Test: Checked that the following md5sums don't change as part of this CL: make core-all core-oj core-libart && md5sum \ out/soong/.intermediates/libcore/core-oj/android_common/withres/core-oj.jar \ out/soong/.intermediates/libcore/core-libart/android_common/withres/core-libart.jar Change-Id: Ie9f0fcc63c8c2db12011323c2fa549b13f1383a1
* Set default visibility to privatePaul Duffin2019-07-021-4/+63
| | | | | | | | | | | | Takes advantage of a new mechanism for specifying the default visibility of all modules in a package to restrict the visibility of libcore modules as much as possible: package {default_visibility: ["//visibility:private"]} Bug: 133290645 Bug: 134379140 Test: m droid Change-Id: I2ba1a6131993d218fd65cd4a8f0ad29a7a83df14
* Merge changes I449d903b,I31bb2339Pete Gillin2019-07-011-0/+10
|\ | | | | | | | | | | * changes: Add a test for jarjar with Java 9 language features. Move Java9LanguageFeaturesTest into its own directory.
| * Add a test for jarjar with Java 9 language features.Pete Gillin2019-06-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | A genrule generates a clone of Java9LanguageFeaturesTest which uses a version of Java9LanguageFeatures repackaged by jarjar. This ensures that jarjar is able to handle a class file which must be at least v53 and includes bytecode compiled from Java 9 language features. Test: cts-tradefed run cts-dev -m CtsLibcoreTestCase -t libcore.libcore.internal Bug: 64761972 Change-Id: I449d903b3cf36a2e8428e8de9097028c57f8c7c5
| * Move Java9LanguageFeaturesTest into its own directory.Pete Gillin2019-06-271-0/+2
| | | | | | | | | | | | | | | | | | | | This is in preparation for http://r.android.com/999933, which adds more build file complexity around this test, and means that complexity is kept out of the top-level libcore JavaLibrary.bp. Test: cts-tradefed run cts-dev -m CtsLibcoreTestCase -t libcore.libcore.internal Change-Id: I31bb233925cfb39c0654b0af0813b33b26527787
* | Stubs generation should not depend on core_platformPaul Duffin2019-06-251-2/+2
|/ | | | | Test: m droid Change-Id: Ia3835306970445b6f224b1c329dc4e63b845e544
* Remove runtime module host tzdata filesNeil Fuller2019-06-181-3/+0
| | | | | | | | | | Remove inclusion of runtime mailine module host time zone data files. The files are now present under simulation of the time zone data mainline module instead. Bug: 132168458 Test: treehugger Change-Id: I4153646e5ba08efb0003fa88fb6fcfb9268e4203
* Replace no_framework_libs: true with sdk_version: "core_platform"Paul Duffin2019-06-121-3/+3
| | | | | | Bug: 134566750 Test: m Change-Id: I154a1324deef7fdb9dabf51f2924f5efdec72aa5
* Switch from no_standard_libs:true to sdk_version:"none"Paul Duffin2019-06-121-14/+14
| | | | | | | | | | The no_standard_libs property is deprecated in favor of sdk_version:"none" as the latter is simpler and less error prone. Bug: 134566750 Test: m droid Change-Id: I38166d4d6dfb580a04b794cdb2b910ab221305eb ge-Id: I138061eb330e0bc17f5ae414f1c3df7979472a6a
* Move android_icu4j_resources_lib to external/icu/android_icu4jPaul Duffin2019-06-071-11/+0
| | | | | | | | | The android_icu4j_resources_lib was only in libcore because the build would not allow no_standard_libs to be used from icu. However, that is no longer true so it can be moved to where it belongs. Test: m droid Change-Id: Ie999e030008a1860af21d9c08fcadd54de539178
* Merge "Add a host simulation of the tzdata module"Treehugger Robot2019-06-061-2/+6
|\
| * Add a host simulation of the tzdata moduleNeil Fuller2019-06-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | Sets up additional files so that host environments can now have a simulation of the time zone data mainline module in addition to the simulation of the runtime mainline module they already have. Bug: 132169989 Test: Treehugger only Change-Id: I4c434ed0de6513c2925a20dbdf96f69def248bb0