summaryrefslogtreecommitdiff
path: root/android/defs.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2020-11-10 12:27:45 -0800
committer Colin Cross <ccross@android.com> 2020-12-11 19:54:16 +0000
commitc20dc8533e0ed41ba3d708e85515980fff04c9f2 (patch)
treefe6fb7c2513fbc2cdb63ac3c6adaef93c9ab533a /android/defs.go
parentd3b30670f2846ebe0a84dfc6bf7bc8a8c38ed110 (diff)
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
Diffstat (limited to 'android/defs.go')
-rw-r--r--android/defs.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/android/defs.go b/android/defs.go
index f5bd362cd..38ecb0505 100644
--- a/android/defs.go
+++ b/android/defs.go
@@ -20,7 +20,7 @@ import (
"testing"
"github.com/google/blueprint"
- _ "github.com/google/blueprint/bootstrap"
+ "github.com/google/blueprint/bootstrap"
"github.com/google/blueprint/proptools"
)
@@ -200,3 +200,8 @@ func ContentFromFileRuleForTests(t *testing.T, params TestingBuildParams) string
return content
}
+
+// GlobToListFileRule creates a rule that writes a list of files matching a pattern to a file.
+func GlobToListFileRule(ctx ModuleContext, pattern string, excludes []string, file WritablePath) {
+ bootstrap.GlobFile(ctx.blueprintModuleContext(), pattern, excludes, file.String())
+}