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
This commit is contained in:
Jihoon Kang
2023-07-01 00:13:47 +00:00
parent c38523cd33
commit 1bfb6f231e
6 changed files with 46 additions and 8 deletions

View File

@@ -455,11 +455,6 @@ func (a *AndroidApp) getOverriddenPackages() []string {
if len(a.overridableAppProperties.Overrides) > 0 {
overridden = append(overridden, a.overridableAppProperties.Overrides...)
}
// When APK name is overridden via PRODUCT_PACKAGE_NAME_OVERRIDES
// ensure that the original name is overridden.
if a.Stem() != a.installApkName {
overridden = append(overridden, a.Stem())
}
return overridden
}