Replace aapt support with aapt2
Use aapt2 instead of aapt to compile Android app resources. Also generate all files into srcjars instead of individual sources. Test: m checkbuild Change-Id: I5a67991a0daf0017e8159b46fcff7d5564a91468
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
_ "github.com/google/blueprint/bootstrap"
|
||||
@@ -130,4 +132,20 @@ func init() {
|
||||
})
|
||||
|
||||
pctx.HostJavaToolVariable("JacocoCLIJar", "jacoco-cli.jar")
|
||||
|
||||
hostBinToolVariableWithPrebuilt := func(name, prebuiltDir, tool string) {
|
||||
pctx.VariableFunc(name, func(config android.Config) (string, error) {
|
||||
if config.UnbundledBuild() || config.IsPdkBuild() {
|
||||
return filepath.Join(prebuiltDir, runtime.GOOS, "bin", tool), nil
|
||||
} else {
|
||||
if path, err := pctx.HostBinToolPath(config, tool); err != nil {
|
||||
return "", err
|
||||
} else {
|
||||
return path.String(), nil
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
hostBinToolVariableWithPrebuilt("Aapt2Cmd", "prebuilt/sdk/tools", "aapt2")
|
||||
}
|
||||
|
Reference in New Issue
Block a user