Add stub_libs properties to art-bootclasspath-fragment
This is being done as part of the hidden API modularization work. The
hidden API processing needs access to the stubs in order to make the
relevant members in the dex implementation jars accessible through the
APIs.
The jacoco-stubs are added to coverage.api.stub_libs as they need to be
added to the stubs when jacocoagent is added to the contents.
Bug: 179354495
Test: m art-module-sdk
- make sure that the stubs are listed in the snapshot
Change-Id: I31a24a3cc99a862a90459aeae9a0b7a9c3e9fc40
diff --git a/build/boot/Android.bp b/build/boot/Android.bp
index 42ed020..8c8f895 100644
--- a/build/boot/Android.bp
+++ b/build/boot/Android.bp
@@ -32,12 +32,38 @@
"bouncycastle",
"apache-xml",
],
+
+ api: {
+ stub_libs: [
+ // Stubs for the core-oj and core-libart. The other modules do not
+ // have any public API.
+ "art.module.public.api",
+ ],
+ },
+ core_platform_api: {
+ stub_libs: [
+ // Core platform stubs for all the non-coverage contents.
+ //
+ // Use the stubs java_library directly and not the java_sdk_library
+ // as the sdk already includes the stubs library and switching it
+ // over to use the java_sdk_library would involve significant
+ // refactoring of the sdk snapshot functionality.
+ "legacy.art.module.platform.api.stubs",
+ ],
+ },
+
// Additional properties to append when coverage is enabled, i.e. when
// EMMA_INSTRUMENT_FRAMEWORK=true
coverage: {
contents: [
"jacocoagent",
],
+ api: {
+ stub_libs: [
+ // Stubs for the jacocoagent.
+ "jacoco-stubs",
+ ],
+ },
},
visibility: [
"//art/build/apex",