Add default jar wrapper when wrapper property is not specified
Bug: b/68779881 Test: manually copied the jar-wrapper.sh to out/soong/host/linux-x86/framework Change-Id: Idee1e7e64c6e3c89c89a8cd9c107a38533356b6c
This commit is contained in:
@@ -869,7 +869,7 @@ type Binary struct {
|
||||
|
||||
binaryProperties binaryProperties
|
||||
|
||||
wrapperFile android.ModuleSrcPath
|
||||
wrapperFile android.SourcePath
|
||||
binaryFile android.OutputPath
|
||||
}
|
||||
|
||||
@@ -882,7 +882,11 @@ 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.
|
||||
j.wrapperFile = android.PathForModuleSrc(ctx, j.binaryProperties.Wrapper)
|
||||
if j.binaryProperties.Wrapper != "" {
|
||||
j.wrapperFile = android.PathForModuleSrc(ctx, j.binaryProperties.Wrapper).SourcePath
|
||||
} else {
|
||||
j.wrapperFile = android.PathForSource(ctx, "build/soong/scripts/jar-wrapper.sh")
|
||||
}
|
||||
j.binaryFile = ctx.InstallExecutable(android.PathForModuleInstall(ctx, "bin"),
|
||||
ctx.ModuleName(), j.wrapperFile, j.installFile)
|
||||
}
|
||||
|
Reference in New Issue
Block a user