From 9c74a1ee855b1dcf4871a4cc40f317bd765ab7fd Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 28 May 2019 14:06:17 -0700 Subject: Don't build hiddenapi flags or encode dex for unbundled builds Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags or encode dex files even if frameworks/base exists. Bug: 133343287 Test: mainline modules build Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46 --- java/java.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 44830839d..8dbdfb6a7 100644 --- a/java/java.go +++ b/java/java.go @@ -1301,9 +1301,11 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) { return } - // Hidden API CSV generation and dex encoding - dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile, - j.deviceProperties.UncompressDex) + if !ctx.Config().UnbundledBuild() { + // Hidden API CSV generation and dex encoding + dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile, + j.deviceProperties.UncompressDex) + } // merge dex jar with resources if necessary if j.resourceJar != nil { -- cgit v1.2.3-59-g8ed1b