From c20dc8533e0ed41ba3d708e85515980fff04c9f2 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 10 Nov 2020 12:27:45 -0800 Subject: Add dependency to list of asset files We had a dependency on each file in the asset directories, but that wouldn't cause aapt2 to run if a file was removed. Add a dependency on a file that contains the list of files in the asset directories. Fixes: 172867096 Test: m CarrierConfig && rm packages/apps/CarrierConfig/assets/carrier_config_no_sim.xml && m CarrierConfig Change-Id: I35f3b85355fa890a3e95eaa6458a21466b6930e4 --- java/android_resources.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'java/android_resources.go') diff --git a/java/android_resources.go b/java/android_resources.go index 720d3a5ae..4d420cfed 100644 --- a/java/android_resources.go +++ b/java/android_resources.go @@ -38,10 +38,21 @@ var androidResourceIgnoreFilenames = []string{ "*~", } +// androidResourceGlob returns the list of files in the given directory, using the standard +// exclusion patterns for Android resources. func androidResourceGlob(ctx android.ModuleContext, dir android.Path) android.Paths { return ctx.GlobFiles(filepath.Join(dir.String(), "**/*"), androidResourceIgnoreFilenames) } +// androidResourceGlobList creates a rule to write the list of files in the given directory, using +// the standard exclusion patterns for Android resources, to the given output file. +func androidResourceGlobList(ctx android.ModuleContext, dir android.Path, + fileListFile android.WritablePath) { + + android.GlobToListFileRule(ctx, filepath.Join(dir.String(), "**/*"), + androidResourceIgnoreFilenames, fileListFile) +} + type overlayType int const ( -- cgit v1.2.3-59-g8ed1b