Merge "Add compile_data for android apps" into main

This commit is contained in:
Treehugger Robot
2023-12-11 19:25:20 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 1 deletions

View File

@@ -141,6 +141,12 @@ type appProperties struct {
// PRODUCT_CHARACTERISTICS.
Generate_product_characteristics_rro *bool
// A list of files or dependencies to make available to the build sandbox. This is
// useful if source files are symlinks, the targets of the symlinks must be listed here.
// Note that currently not all actions implemented by android_apps are sandboxed, so you
// may only see this being necessary in lint builds.
Compile_data []string
ProductCharacteristicsRROPackageName *string `blueprint:"mutated"`
ProductCharacteristicsRROManifestModuleName *string `blueprint:"mutated"`
}
@@ -821,6 +827,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
a.linter.mergedManifest = a.aapt.mergedManifestFile
a.linter.manifest = a.aapt.manifestPath
a.linter.resources = a.aapt.resourceFiles
a.linter.compile_data = android.PathsForModuleSrc(ctx, a.appProperties.Compile_data)
a.linter.buildModuleReportZip = ctx.Config().UnbundledBuildApps()
dexJarFile, packageResources := a.dexBuildActions(ctx)

View File

@@ -93,6 +93,7 @@ type linter struct {
outputs lintOutputs
properties LintProperties
extraMainlineLintErrors []string
compile_data android.Paths
reports android.Paths
@@ -448,7 +449,7 @@ func (l *linter) lint(ctx android.ModuleContext) {
srcsList := android.PathForModuleOut(ctx, "lint", "lint-srcs.list")
srcsListRsp := android.PathForModuleOut(ctx, "lint-srcs.list.rsp")
rule.Command().Text("cp").FlagWithRspFileInputList("", srcsListRsp, l.srcs).Output(srcsList)
rule.Command().Text("cp").FlagWithRspFileInputList("", srcsListRsp, l.srcs).Output(srcsList).Implicits(l.compile_data)
lintPaths := l.writeLintProjectXML(ctx, rule, srcsList)