Change java stem attribute for both device and host

Bug: 329762127
Test: cd build/soong/java ; go test -run TestJavaLibHostWithStem
Test: cd build/soong/java ; go test -run TestAppStem
Test: cd build/soong/java ; go test -run TestAndroidAppImport_ArchVariants
Test: cd build/soong/java ; go test -run TestOverrideAndroidAppStem
Test: cd build/soong/java ; go test -run TestOverrideAndroidApp
Test: cd build/soong/java ; go test -run TestPackageNameOverride

Change-Id: I8fbdc82116f9a0c68121fbbeb1ef4f78f2b6fea3
This commit is contained in:
yangbill
2024-03-15 09:29:29 +00:00
parent 08bef285d8
commit 2af0b6edd7
6 changed files with 63 additions and 11 deletions

View File

@@ -889,7 +889,7 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
}
j.stem = proptools.StringDefault(j.overridableDeviceProperties.Stem, ctx.ModuleName())
j.stem = proptools.StringDefault(j.overridableProperties.Stem, ctx.ModuleName())
proguardSpecInfo := j.collectProguardSpecInfo(ctx)
android.SetProvider(ctx, ProguardSpecInfoProvider, proguardSpecInfo)
@@ -1686,7 +1686,7 @@ func (j *Binary) HostToolPath() android.OptionalPath {
}
func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.stem = proptools.StringDefault(j.overridableDeviceProperties.Stem, ctx.ModuleName())
j.stem = proptools.StringDefault(j.overridableProperties.Stem, ctx.ModuleName())
if ctx.Arch().ArchType == android.Common {
// Compile the jar
@@ -2997,7 +2997,7 @@ func DefaultsFactory() android.Module {
module.AddProperties(
&CommonProperties{},
&DeviceProperties{},
&OverridableDeviceProperties{},
&OverridableProperties{},
&DexProperties{},
&DexpreoptProperties{},
&android.ProtoProperties{},