From b69301ee9696d83a75f88ad38d6e27cc6f14b76a Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 1 Dec 2017 10:48:26 -0800 Subject: 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 --- java/app_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'java/app_test.go') diff --git a/java/app_test.go b/java/app_test.go index 35230d45f..73ac3f78e 100644 --- a/java/app_test.go +++ b/java/app_test.go @@ -17,6 +17,7 @@ package java import ( "android/soong/android" "reflect" + "sort" "testing" ) @@ -79,7 +80,11 @@ func TestApp(t *testing.T) { t.Errorf("expected aapt2 compile inputs expected:\n %#v\n got:\n %#v", resourceFiles, compile.Inputs.Strings()) } - expectedLinkImplicits = append(expectedLinkImplicits, compile.Outputs.Strings()...) + + compiledResourceOutputs := compile.Outputs.Strings() + sort.Strings(compiledResourceOutputs) + + expectedLinkImplicits = append(expectedLinkImplicits, compiledResourceOutputs...) list := foo.Output("aapt2/res.list") expectedLinkImplicits = append(expectedLinkImplicits, list.Output.String()) -- cgit v1.2.3-59-g8ed1b