Use repackaged lint binary
Lint references lint-classpath.jar, which does not contain any classes
by has a manifest that points to other jars for the classpath. This
breaks dependency tracking during the build. Use a lint tool that
is repackaged into a single jar.
Bug: 181681346
Test: m lint-check
Change-Id: I07d2b7404c18626e03c5af3ef5a75dd7f899cb0e
diff --git a/java/lint.go b/java/lint.go
index 8272595..af83664 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -329,8 +329,7 @@
FlagWithArg("ANDROID_SDK_HOME=", homeDir.String()).
FlagWithInput("SDK_ANNOTATIONS=", annotationsZipPath).
FlagWithInput("LINT_OPTS=-DLINT_API_DATABASE=", apiVersionsXMLPath).
- Tool(android.PathForSource(ctx, "prebuilts/cmdline-tools/tools/bin/lint")).
- Implicit(android.PathForSource(ctx, "prebuilts/cmdline-tools/tools/lib/lint-classpath.jar")).
+ BuiltTool("lint").
Flag("--quiet").
FlagWithInput("--project ", projectXML).
FlagWithInput("--config ", lintXML).