See README.md in the parent directory for general information.
git clone https://github.com/googlesamples/android-custom-lint-rules.git
cd android-custom-lint-rules
./gradlew build
cp ./build/libs/android-custom-lint-rules.jar ~/.android/lint/
lint --show MainActivityDetector
./gradlew lint
Note: If you can't run
lint
directly, you may want to include android toolsPATH
in your~/.bash_profile
. (i.e.PATH=$PATH:~/Library/Android/sdk/tools
)Then run
source ~/.bash_profile
.
compile "com.android.tools.lint:lint-api:$lintVersion"
compile "com.android.tools.lint:lint-checks:$lintVersion"
testCompile "junit:junit:4.11"
testCompile "com.android.tools.lint:lint:$lintVersion"
testCompile "com.android.tools.lint:lint-tests:$lintVersion"
testCompile "com.android.tools:testutils:$lintVersion"