Skip to content

Commit

Permalink
Merge "Sort jarjar rename keys before using" into main am: 688f824 am:
Browse files Browse the repository at this point in the history
…224ac62

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2981731

Change-Id: I6e5a5fa9b8cd1bb49a0d90b9996838b4cf3669aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
  • Loading branch information
iskim517 authored and android-build-merge-worker-robot committed Feb 29, 2024
2 parents 693ba5c + 224ac62 commit fa38c8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,8 @@ type JarJarProviderData struct {

func (this JarJarProviderData) GetDebugString() string {
result := ""
for k, v := range this.Rename {
for _, k := range android.SortedKeys(this.Rename) {
v := this.Rename[k]
if strings.Contains(k, "android.companion.virtual.flags.FakeFeatureFlagsImpl") {
result += k + "--&gt;" + v + ";"
}
Expand Down Expand Up @@ -2669,7 +2670,8 @@ func (module *Module) collectJarJarRules(ctx android.ModuleContext) *JarJarProvi
// to "" won't be in this list because they shouldn't be renamed yet.
func getJarJarRuleText(provider *JarJarProviderData) string {
result := ""
for orig, renamed := range provider.Rename {
for _, orig := range android.SortedKeys(provider.Rename) {
renamed := provider.Rename[orig]
if renamed != "" {
result += "rule " + orig + " " + renamed + "\n"
}
Expand Down

0 comments on commit fa38c8c

Please sign in to comment.