Merge "Set root dir in lint project.xml" am: 28d6549529 am: f773127830

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1347863

Change-Id: Ic0d84d9ce9a8e2cf76f3aa1f8f19d32caa54e83d
This commit is contained in:
Colin Cross
2020-06-23 22:10:13 +00:00
committed by Automerger Merge Worker
2 changed files with 9 additions and 2 deletions

View File

@@ -155,8 +155,11 @@ func (l *linter) writeLintProjectXML(ctx android.ModuleContext,
cmd.FlagForEachArg("--extra_checks_jar ", l.extraLintCheckJars.Strings())
deps = append(deps, l.extraLintCheckJars...)
// The cache tag in project.xml is relative to the project.xml file.
cmd.FlagWithArg("--cache_dir ", "cache")
cmd.FlagWithArg("--root_dir ", "$PWD")
// The cache tag in project.xml is relative to the root dir, or the project.xml file if
// the root dir is not set.
cmd.FlagWithArg("--cache_dir ", cacheDir.String())
cmd.FlagWithInput("@",
android.PathForSource(ctx, "build/soong/java/lint_defaults.txt"))