Install java_binary wrappers in make
Convert java_binary modules into two make modules, one for the
underlying java_library and one for the wrapper prebuilt.
Test: m -j checkbuild
Change-Id: I5ddf74f24f1e41fc1f39b3e8d254b7e191dbd47a
diff --git a/java/java.go b/java/java.go
index 4c614e5..ac88020 100644
--- a/java/java.go
+++ b/java/java.go
@@ -486,6 +486,9 @@
Library
binaryProperties binaryProperties
+
+ wrapperFile android.ModuleSrcPath
+ binaryFile android.OutputPath
}
func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
@@ -493,8 +496,9 @@
// Depend on the installed jar (j.installFile) so that the wrapper doesn't get executed by
// another build rule before the jar has been installed.
- ctx.InstallFile(android.PathForModuleInstall(ctx, "bin"), android.PathForModuleSrc(ctx, j.binaryProperties.Wrapper),
- j.installFile)
+ j.wrapperFile = android.PathForModuleSrc(ctx, j.binaryProperties.Wrapper)
+ j.binaryFile = ctx.InstallFile(android.PathForModuleInstall(ctx, "bin"),
+ j.wrapperFile, j.installFile)
}
func (j *Binary) DepsMutator(ctx android.BottomUpMutatorContext) {