diff options
author | Colin Cross <ccross@android.com> | 2017-12-01 10:48:26 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-12-01 19:16:42 +0000 |
commit | b69301ee9696d83a75f88ad38d6e27cc6f14b76a (patch) | |
tree | 9e21b490e9469342f5fce308613cc8d276ded49b /java/aapt2.go | |
parent | 890ff551f72af2369668a9b5c10914f527b37afb (diff) | |
download | build_soong-b69301ee9696d83a75f88ad38d6e27cc6f14b76a.tar.gz build_soong-b69301ee9696d83a75f88ad38d6e27cc6f14b76a.tar.bz2 build_soong-b69301ee9696d83a75f88ad38d6e27cc6f14b76a.zip |
Sort compiled resources by output path
Soong was keeping the compiled resources in the same order as the
input resources, which are sorted lexicographically. Converting the
path names in pathsToAapt2Paths results in a list that is no longer
lexicographically sorted.
Make sorts the inputs to aapt2 link by compiled resource name, so
do the same in Soong.
Bug: 69917341
Test: no change to framework-res.apk when converting to Soong
Change-Id: I29e8339b9969b0d323d469dac140c7e172b7ebfa
Diffstat (limited to 'java/aapt2.go')
-rw-r--r-- | java/aapt2.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/aapt2.go b/java/aapt2.go index cebd6d15..84e3729f 100644 --- a/java/aapt2.go +++ b/java/aapt2.go @@ -16,6 +16,7 @@ package java import ( "path/filepath" + "sort" "strconv" "strings" @@ -85,6 +86,9 @@ func aapt2Compile(ctx android.ModuleContext, dir android.Path, paths android.Pat }) } + sort.Slice(ret, func(i, j int) bool { + return ret[i].String() < ret[j].String() + }) return ret } |