diff options
| author | 2023-07-01 00:13:47 +0000 | |
|---|---|---|
| committer | 2023-07-14 21:41:46 +0000 | |
| commit | 1bfb6f231ea98d9ec59a759cf5bb85b250133bc1 (patch) | |
| tree | ee8a8bfcb6226079d6af53104958c569359812c2 /java/java.go | |
| parent | c38523cd3320cca41f82d664f79a1ae149902465 (diff) | |
Fix stem to be propagated to output jar name in java_library
Currently, java_library.stem property is not correctly reflected in the
output jar name in java_library when the module specifies
java_resource_dirs property. This change fixes the unexpected behavior
so that setting the stem property behaves as expected.
Test: go test ./java && m
Bug: 285843207
Change-Id: I0941fcea83c92f4c42ae415aa6ad9125da5cf57b
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/java/java.go b/java/java.go index d3762f630..f18cd601b 100644 --- a/java/java.go +++ b/java/java.go @@ -676,6 +676,8 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {  	j.minSdkVersion = j.MinSdkVersion(ctx)  	j.maxSdkVersion = j.MaxSdkVersion(ctx) +	j.stem = proptools.StringDefault(j.overridableDeviceProperties.Stem, ctx.ModuleName()) +  	apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)  	if !apexInfo.IsForPlatform() {  		j.hideApexVariantFromMake = true @@ -1468,6 +1470,8 @@ func (j *Binary) HostToolPath() android.OptionalPath {  }  func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) { +	j.stem = proptools.StringDefault(j.overridableDeviceProperties.Stem, ctx.ModuleName()) +  	if ctx.Arch().ArchType == android.Common {  		// Compile the jar  		if j.binaryProperties.Main_class != nil { |