Loading java/base.go +17 −14 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,22 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath completeStaticLibsImplementationJarsToCombine := completeStaticLibsImplementationJars if j.shouldInstrument(ctx) { // Enable dex compilation for the APEX variants, unless it is disabled explicitly compileDex := Bool(j.dexProperties.Compile_dex) apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider) if j.DirectlyInAnyApex() && !apexInfo.IsForPlatform() { if j.dexProperties.Compile_dex == nil { compileDex = true } if j.deviceProperties.Hostdex == nil { j.deviceProperties.Hostdex = proptools.BoolPtr(true) } } if Bool(j.properties.Installable) { compileDex = true } if j.shouldInstrument(ctx) && (!ctx.Device() || compileDex) { instrumentedOutputFile := j.instrument(ctx, flags, outputFile, jarName, specs) completeStaticLibsImplementationJarsToCombine = depset.New(depset.PREORDER, android.Paths{instrumentedOutputFile}, nil) outputFile = instrumentedOutputFile Loading Loading @@ -1764,19 +1779,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath j.implementationAndResourcesJar = outputFile // Enable dex compilation for the APEX variants, unless it is disabled explicitly compileDex := j.dexProperties.Compile_dex apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider) if j.DirectlyInAnyApex() && !apexInfo.IsForPlatform() { if compileDex == nil { compileDex = proptools.BoolPtr(true) } if j.deviceProperties.Hostdex == nil { j.deviceProperties.Hostdex = proptools.BoolPtr(true) } } if ctx.Device() && (Bool(j.properties.Installable) || Bool(compileDex)) { if ctx.Device() && compileDex { if j.hasCode(ctx) { if j.shouldInstrumentStatic(ctx) { j.dexer.extraProguardFlagsFiles = append(j.dexer.extraProguardFlagsFiles, Loading java/java_test.go +1 −0 Original line number Diff line number Diff line Loading @@ -3050,6 +3050,7 @@ func TestCoverage(t *testing.T) { java_library { name: "android.car", srcs: ["android.car.java"], installable: true, } `) Loading Loading
java/base.go +17 −14 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,22 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath completeStaticLibsImplementationJarsToCombine := completeStaticLibsImplementationJars if j.shouldInstrument(ctx) { // Enable dex compilation for the APEX variants, unless it is disabled explicitly compileDex := Bool(j.dexProperties.Compile_dex) apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider) if j.DirectlyInAnyApex() && !apexInfo.IsForPlatform() { if j.dexProperties.Compile_dex == nil { compileDex = true } if j.deviceProperties.Hostdex == nil { j.deviceProperties.Hostdex = proptools.BoolPtr(true) } } if Bool(j.properties.Installable) { compileDex = true } if j.shouldInstrument(ctx) && (!ctx.Device() || compileDex) { instrumentedOutputFile := j.instrument(ctx, flags, outputFile, jarName, specs) completeStaticLibsImplementationJarsToCombine = depset.New(depset.PREORDER, android.Paths{instrumentedOutputFile}, nil) outputFile = instrumentedOutputFile Loading Loading @@ -1764,19 +1779,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath j.implementationAndResourcesJar = outputFile // Enable dex compilation for the APEX variants, unless it is disabled explicitly compileDex := j.dexProperties.Compile_dex apexInfo, _ := android.ModuleProvider(ctx, android.ApexInfoProvider) if j.DirectlyInAnyApex() && !apexInfo.IsForPlatform() { if compileDex == nil { compileDex = proptools.BoolPtr(true) } if j.deviceProperties.Hostdex == nil { j.deviceProperties.Hostdex = proptools.BoolPtr(true) } } if ctx.Device() && (Bool(j.properties.Installable) || Bool(compileDex)) { if ctx.Device() && compileDex { if j.hasCode(ctx) { if j.shouldInstrumentStatic(ctx) { j.dexer.extraProguardFlagsFiles = append(j.dexer.extraProguardFlagsFiles, Loading
java/java_test.go +1 −0 Original line number Diff line number Diff line Loading @@ -3050,6 +3050,7 @@ func TestCoverage(t *testing.T) { java_library { name: "android.car", srcs: ["android.car.java"], installable: true, } `) Loading