Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 129b9cee authored by Anton Hansson's avatar Anton Hansson
Browse files

Workaround dupe resource directories

A few apps are co-located with libraries they depend on statically,
and because it's not possible to specify "no resource_dirs", they
both end up depending on the same resources, leading to downstream
problems for RRO generation.

Workaround the problem by de-duping the RRO paths for a single app
for now.

Bug: 124035856
Bug: 123510624
Test: make with enforce_rro == *
Change-Id: I251f123eb4280ed72e1ccd2212cb5f3e746e645d
parent 6ff48cd0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -186,6 +186,8 @@ func (a *aapt) buildActions(ctx android.ModuleContext, sdkContext sdkContext, ex
	linkFlags, linkDeps, resDirs, overlayDirs, rroDirs := a.aapt2Flags(ctx, sdkContext, manifestPath)

	rroDirs = append(rroDirs, staticRRODirs...)
	// TODO(b/124035856): stop de-duping when there are no more dupe resource dirs.
	rroDirs = android.FirstUniquePaths(rroDirs)

	linkFlags = append(linkFlags, libFlags...)
	linkDeps = append(linkDeps, libDeps...)