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
This commit is contained in:
Colin Cross
2017-08-10 17:09:43 -07:00
parent b8245ea839
commit 10a0349d98
2 changed files with 29 additions and 2 deletions

View File

@@ -486,6 +486,9 @@ type Binary struct {
Library
binaryProperties binaryProperties
wrapperFile android.ModuleSrcPath
binaryFile android.OutputPath
}
func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
@@ -493,8 +496,9 @@ func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// 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) {