diff options
Diffstat (limited to 'java/lint.go')
-rw-r--r-- | java/lint.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/lint.go b/java/lint.go index ca87dbab6..b73d6a51a 100644 --- a/java/lint.go +++ b/java/lint.go @@ -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")) |