android-custom-lint-rules
android-custom-lint-rules copied to clipboard
Custom lint rules ignored for :library module
When I tried moving the Test.kt file from the :app module to the :library module, lint stopped reporting the expected warning.
Steps to reproduce:
git clone https://github.com/googlesamples/android-custom-lint-rules.gitcd android-custom-lint-rules- Move Test.kt to library module:
mkdir -p library/src/main/java/com/example/lint/librarymv app/src/main/java/com/android/example/Test.kt library/src/main/java/com/example/lint/librarysed -i '' 's/com.android.example/com.example.lint.library/' library/src/main/java/com/example/lint/library/Test.kt
- Run either of these lint commands:
./gradlew :library:lint./gradlew lint
- Expected "Warning: This code mentions lint: Congratulations [SampleId]" but got none
This may be related to Custom lint checks stopped running for multi-module Android project after upgrading to Android Gradle Plugin 4.2.2
We have a similar problem in a multi module project. Basically in the non-android modules we are unable to run our custom lints. @tnorbye there a way to fix it?