Use manifest merger in Soong

Move the manifest merger config to Soong, and use it to merge
manifests of static dependencies of android_library and android_app
modules.

Bug: 110848854
Test: m checkbuild
Change-Id: Ib89e1f1a52a8b76157e4e0348baf42800412df0d
Merged-In: Ib89e1f1a52a8b76157e4e0348baf42800412df0d
Merged-In: I5d055ce63b8371db500f8868fb73ab3604b8c24a
This commit is contained in:
Colin Cross
2018-05-24 16:11:20 -07:00
parent 5e48b1d183
commit 31656958d6
8 changed files with 138 additions and 20 deletions

View File

@@ -20,6 +20,7 @@ import (
"io/ioutil"
"os"
"strconv"
"strings"
"github.com/google/blueprint/proptools"
)
@@ -240,8 +241,16 @@ func (c *makeVarsContext) SingletonContext() SingletonContext {
return c.ctx
}
var ninjaDescaper = strings.NewReplacer("$$", "$")
func (c *makeVarsContext) Eval(ninjaStr string) (string, error) {
return c.ctx.Eval(c.pctx, ninjaStr)
s, err := c.ctx.Eval(c.pctx, ninjaStr)
if err != nil {
return "", err
}
// SingletonContext.Eval returns an exapnded string that is valid for a ninja file, de-escape $$ to $ for use
// in a Makefile
return ninjaDescaper.Replace(s), nil
}
func (c *makeVarsContext) addVariableRaw(name, value string, strict, sort bool) {