Soong AAR prebuilt support
Add support for android_library_import modules that take an aar file. Bug: 73724997 Test: m checkbuild Change-Id: I670b56f0a3b7501d9478a6064a04d0cb9c1bb611
This commit is contained in:
@@ -81,6 +81,8 @@ func aapt2Compile(ctx android.ModuleContext, dir android.Path, paths android.Pat
|
||||
Outputs: outPaths,
|
||||
Args: map[string]string{
|
||||
"outDir": android.PathForModuleOut(ctx, "aapt2", dir.String()).String(),
|
||||
// Always set --pseudo-localize, it will be stripped out later for release
|
||||
// builds that don't want it.
|
||||
"cFlags": "--pseudo-localize",
|
||||
},
|
||||
})
|
||||
@@ -92,6 +94,21 @@ func aapt2Compile(ctx android.ModuleContext, dir android.Path, paths android.Pat
|
||||
return ret
|
||||
}
|
||||
|
||||
func aapt2CompileDirs(ctx android.ModuleContext, flata android.WritablePath, dirs android.Paths, deps android.Paths) {
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: aapt2CompileRule,
|
||||
Description: "aapt2 compile dirs",
|
||||
Implicits: deps,
|
||||
Output: flata,
|
||||
Args: map[string]string{
|
||||
"outDir": flata.String(),
|
||||
// Always set --pseudo-localize, it will be stripped out later for release
|
||||
// builds that don't want it.
|
||||
"cFlags": "--pseudo-localize " + android.JoinWithPrefix(dirs.Strings(), "--dir "),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
var aapt2LinkRule = pctx.AndroidStaticRule("aapt2Link",
|
||||
blueprint.RuleParams{
|
||||
Command: `${config.Aapt2Cmd} link -o $out $flags --java $genDir --proguard $proguardOptions $inFlags && ` +
|
||||
|
Reference in New Issue
Block a user