Make runtime_resource_overlay product specific.

When mk2bp'ing a runtime_resource_overlay module, make it product
specific by default so that it reflects how the current make
configuration works.

Bug: 155783598
Test: bpfix_test.go
Change-Id: Icafa8228fe65ecc5b33ad80ad721e7997fbff383
This commit is contained in:
Jaewoong Jung
2021-02-25 14:23:47 -08:00
parent fc3bfe54c3
commit 3ef77e89f0
3 changed files with 104 additions and 0 deletions

View File

@@ -48,6 +48,22 @@ var invalidVariableStringToReplacement = map[string]string{
"-": "_dash_",
}
// Fix steps that should only run in the androidmk tool, i.e. should only be applied to
// newly-converted Android.bp files.
var fixSteps = bpfix.FixStepsExtension{
Name: "androidmk",
Steps: []bpfix.FixStep{
{
Name: "RewriteRuntimeResourceOverlay",
Fix: bpfix.RewriteRuntimeResourceOverlay,
},
},
}
func init() {
bpfix.RegisterFixStepExtension(&fixSteps)
}
func (f *bpFile) insertComment(s string) {
f.comments = append(f.comments, &bpparser.CommentGroup{
Comments: []*bpparser.Comment{