Extend ART sdk with prebuilts needed to build the platform
Members which are common to android and linux but are not needed for
windows are placed in the linux target which applies to both android
and host linux but not windows (or darwin which is disabled anyway).
Test: Build zip snapshots of ART sdk and module_exports.
Move art source directories away.
Unpack zip snapshots into prebuilts/modules_sdk/art directory
m nothing
Bug: 172480615
Change-Id: I01b493436a021054c03c420a52cfae35dba15181
diff --git a/build/sdk/Android.bp b/build/sdk/Android.bp
index 1eeefac..1a922fd 100644
--- a/build/sdk/Android.bp
+++ b/build/sdk/Android.bp
@@ -28,14 +28,35 @@
prebuilt_visibility: prebuilt_visibility,
- native_header_libs: [
- "jni_headers",
- "libnativehelper_header_only",
- ],
- native_shared_libs: [
- "libandroidio",
- ],
target: {
+ // Both android and host linux but not windows or darwin.
+ linux: {
+ native_header_libs: [
+ "jni_headers",
+ "libartpalette-headers",
+ "libnativehelper_header_only",
+ "libopenjdkjvmti_headers",
+ ],
+
+ native_shared_libs: [
+ "libandroidio",
+ "libdexfile_external",
+ "libnativebridge",
+ "libnativehelper",
+ "libnativeloader",
+ ],
+
+ native_libs: [
+ "libdexfile_support",
+
+ // TODO(b/142944043): Convert to APEX stubs and export as a shared lib, once linker support is in place.
+ "libsigchain",
+ ],
+
+ native_static_libs: [
+ "libdexfile_external_static",
+ ],
+ },
android: {
java_header_libs: [
// Needed by any module that builds against any non-numeric
@@ -64,6 +85,10 @@
"stable.core.platform.api.stubs",
],
+ java_sdk_libs: [
+ "art.module.public.api",
+ ],
+
java_system_modules: [
"art-module-public-api-stubs-system-modules",
"art-module-intra-core-api-stubs-system-modules",
@@ -73,7 +98,19 @@
"legacy-core-platform-api-stubs-system-modules",
"stable-core-platform-api-stubs-system-modules",
],
+ native_header_libs: [
+ "libnativeloader-headers",
+ ],
+ native_shared_libs: [
+ "libnativebridge_lazy",
+ "libnativehelper_compat_libc++",
+ "libnativeloader_lazy",
+ ],
+ native_static_libs: [
+ "libctstiagent",
+ ],
},
+
darwin: {
enabled: false,
},
@@ -84,11 +121,19 @@
module_exports {
name: "art-module-host-exports",
host_supported: true,
- device_supported: false,
+ // TODO(b/173186484) - remove once art-notices-for-framework-stubs-jar has been removed.
+ device_supported: true,
prebuilt_visibility: prebuilt_visibility,
target: {
+ android: {
+ java_libs: [
+ // TODO(b/173186484) - embed notices in stubs and remove this.
+ // Needed for android_stubs_current et al.
+ "art-notices-for-framework-stubs-jar",
+ ],
+ },
host: {
// Set in target.host because the top level compile_multilib
// property is fixed to "both" in the sdk/module_exports
@@ -97,20 +142,15 @@
java_libs: [
"art.module.api.annotations",
+
+ // Needed for grpc-grpc-java
+ "okhttp-norepackage",
],
native_binaries: [
"hiddenapi",
"dex2oat",
"dex2oatd",
],
- native_shared_libs: [
- // The following three libraries are internal implementation libraries
- // that are needed by hiddenapi.
- // TODO(http://b/155372760): Remove dependencies.
- "libartbase",
- "libartpalette",
- "libdexfile",
- ],
},
darwin: {
enabled: false,
@@ -125,26 +165,44 @@
prebuilt_visibility: prebuilt_visibility,
- java_libs: [
- // The following bouncycastle modules are required by:
- // * conscrypt-benchmarks (all)
- // * conscrypt-tests (all)
- // * signapk (all except ocsp)
- "bouncycastle-unbundled",
- "bouncycastle-bcpkix-unbundled",
- "bouncycastle-ocsp-unbundled",
- ],
target: {
android: {
java_libs: [
"core-compat-test-rules",
- "core-compat-test-rules",
"core-test-rules",
"core-tests-support",
"okhttp-tests-nojarjar",
+
+ // Needed for CtsJvmtiDeviceRunTestAppBase.
+ "art_cts_jvmti_test_library",
+ "expected_cts_outputs",
+
+ // Needed for robolectric.
+ "core-libart",
+ "okhttp",
+
+ // Needed for CtsLibcore...TestCases
+ "libcore-expectations-knownfailures-jar",
+ "libcore-expectations-virtualdeviceknownfailures-jar",
+
+ // Needed for CtsLibcoreOkHttpTestCases
+ "okhttp-nojarjar",
],
java_tests: [
+ // Needed for CtsJdwpTestCases.
+ "apache-harmony-jdwp-tests",
+
"libcore-crypto-tests",
+
+ // Needed for CtsLibcoreOjTestCases
+ "core-ojtests-public",
+
+ // Needed for CtsLibcoreJsr166TestCases
+ "jsr166-tests",
+
+ // Needed for CtsLibcoreTestCases
+ "apache-harmony-tests",
+ "core-tests",
],
native_shared_libs: [
"libjavacoretests",
diff --git a/libartpalette/Android.bp b/libartpalette/Android.bp
index ea53e00..80e67fd 100644
--- a/libartpalette/Android.bp
+++ b/libartpalette/Android.bp
@@ -25,7 +25,10 @@
name: "libartpalette-headers",
export_include_dirs: ["include"],
host_supported: true,
- visibility: ["//system/libartpalette"],
+ visibility: [
+ "//art:__subpackages__",
+ "//system/libartpalette",
+ ],
}
// libartpalette is the dynamic loader of the platform abstraction
diff --git a/test/Android.bp b/test/Android.bp
index 16ded05..6ecc198 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -674,6 +674,7 @@
java_library {
name: "art_cts_jvmti_test_library",
visibility: [
+ "//art:__subpackages__",
"//cts/hostsidetests/jvmti:__subpackages__",
],
srcs: [