Replace android.WriteFile rule with android.WriteFileRule
The android.WriteFile rule takes careful escaping to produce the
right contents. Wrap it in an android.WriteFileRule that handles
the escaping.
Test: compare all android.WriteFile outputs
Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index 03accc8..f77246e 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -488,13 +488,7 @@
return
}
- ctx.Build(pctx, android.BuildParams{
- Rule: android.WriteFile,
- Output: android.PathForOutput(ctx, "dexpreopt_soong.config"),
- Args: map[string]string{
- "content": string(data),
- },
- })
+ android.WriteFileRule(ctx, android.PathForOutput(ctx, "dexpreopt_soong.config"), string(data))
}
func (s *globalSoongConfigSingleton) MakeVars(ctx android.MakeVarsContext) {