diff options
| author | 2017-11-03 14:53:31 -0700 | |
|---|---|---|
| committer | 2017-11-03 15:19:15 -0700 | |
| commit | 3c807db06ed10aa70b368df3dfd5b93a718988f5 (patch) | |
| tree | d6edb43be23f457f59f947d07dde3f56c09acb1b /java | |
| parent | f45c6934c84ba3432bffb20dcf4b5bdf0c0dda2e (diff) | |
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
Diffstat (limited to 'java')
| -rw-r--r-- | java/java.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index 1541dec2a..f9a4c04d2 100644 --- a/java/java.go +++ b/java/java.go @@ -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) } |