summaryrefslogtreecommitdiff
path: root/java/base.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-05-08 22:28:05 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-05-08 22:28:05 +0000
commit7eaf503cfd42a70f625405bb4a4b67eb5de47c8d (patch)
tree538010b7947258f555d652310530ccf43905ce72 /java/base.go
parent2aff024c189e5217b102d7b307fddc6c303b1c38 (diff)
parenta3a05460b478ed59c527dec1c8b2efa61ce9c53c (diff)
Merge "Revert^2 "Remove compilation actions from java sdk library"" into main
Diffstat (limited to 'java/base.go')
-rw-r--r--java/base.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/java/base.go b/java/base.go
index 938ac5e82..06c18ca43 100644
--- a/java/base.go
+++ b/java/base.go
@@ -1682,7 +1682,11 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
j.dexJarFile = makeDexJarPathFromPath(dexOutputFile)
// Dexpreopting
- j.dexpreopt(ctx, android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName()), dexOutputFile)
+ libName := android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName())
+ if j.SdkLibraryName() != nil && strings.HasSuffix(ctx.ModuleName(), ".impl") {
+ libName = strings.TrimSuffix(libName, ".impl")
+ }
+ j.dexpreopt(ctx, libName, dexOutputFile)
outputFile = dexOutputFile
} else {