googlesamples / android-custom-lint-rules

This sample demonstrates how to create a custom lint checks and corresponding lint tests
Apache License 2.0
960 stars 174 forks source link

ANDROID_LINT_JARS environment doesn't work #50

Open gosp opened 3 years ago

gosp commented 3 years ago

download the latest code, and remove implementation project(':library') in app/build.gradle; and copy checks.jar to /tmp

osboxes# export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-11-hotspot-amd64
osboxes# export ANDROID_LINT_JARS=/tmp/checks.jar 
osboxes# ./gradlew clean :app:build              

> Task :app:lintDebug

Scanning app: ...
No issues found.

> Task :app:copyDebugAndroidLintReports
Copying lint SARIF report to /home/osboxes/Documents/android-custom-lint-rules/lint-results.sarif

BUILD SUCCESSFUL in 3s
76 actionable tasks: 74 executed, 2 up-to-date
gosp commented 3 years ago

It works after I downgrade gradlePluginVersion from 7.0.0-alpha10 to 4.2.1; lintVersion from 30.0.0-alpha10 to 27.2.1

scott-pollom commented 3 years ago

This should be fixed in AGP 7.0.0-beta05