From a12c0f506cf509e1220f0095010350181c31c367 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 27 Jun 2018 11:00:11 -0700 Subject: [PATCH] Mark installable jars with installable: true Most jars don't need to be installed on the device. Instead of using java_library and java_library_static to distinguish between them make java_library and java_library_static identical and use installable: true to identify the few jars that need to be dexed and installed on the device. Bug: 110885583 Test: m checkbuild Change-Id: I579da7c1a712ec4fb49e288e7f3ab369cb75baf4 --- Android.bp | 2 ++ services/Android.bp | 1 + test-base/Android.bp | 2 ++ test-mock/Android.bp | 1 + test-runner/Android.bp | 1 + 5 files changed, 7 insertions(+) diff --git a/Android.bp b/Android.bp index f11b6fe0e13cb..e50241af0bd81 100644 --- a/Android.bp +++ b/Android.bp @@ -27,6 +27,7 @@ java_library { name: "framework", + installable: true, srcs: [ // From build/make/core/pathmap.mk FRAMEWORK_BASE_SUBDIRS @@ -672,6 +673,7 @@ gensrcs { // ============================================================ java_library { name: "ext", + installable: true, no_framework_libs: true, static_libs: [ "libphonenumber-platform", diff --git a/services/Android.bp b/services/Android.bp index d125adc5fa7dd..bea51be321c99 100644 --- a/services/Android.bp +++ b/services/Android.bp @@ -2,6 +2,7 @@ // ============================================================ java_library { name: "services", + installable: true, dex_preopt: { app_image: true, diff --git a/test-base/Android.bp b/test-base/Android.bp index a0e39856e9c78..9b1867cd90fd5 100644 --- a/test-base/Android.bp +++ b/test-base/Android.bp @@ -21,6 +21,7 @@ // Also contains the com.android.internal.util.Predicate[s] classes. java_library { name: "android.test.base", + installable: true, srcs: ["src/**/*.java"], @@ -42,6 +43,7 @@ java_library { // Also contains the com.android.internal.util.Predicate[s] classes. java_library { name: "legacy-test", + installable: true, sdk_version: "current", static_libs: ["android.test.base"], diff --git a/test-mock/Android.bp b/test-mock/Android.bp index 8fb6fda41f599..848fd7c2199e1 100644 --- a/test-mock/Android.bp +++ b/test-mock/Android.bp @@ -18,6 +18,7 @@ // =================================== java_library { name: "android.test.mock", + installable: true, // Needs to be consistent with the repackaged version of this make target. java_version: "1.8", diff --git a/test-runner/Android.bp b/test-runner/Android.bp index 29d7ea9b5e805..c0eb489d5ab33 100644 --- a/test-runner/Android.bp +++ b/test-runner/Android.bp @@ -18,6 +18,7 @@ // ===================================== java_library { name: "android.test.runner", + installable: true, // Needs to be consistent with the repackaged version of this make target. java_version: "1.8",