Skip to content

Gradle sample for android project with lint, checkstyle, findbugs and pmd.

Notifications You must be signed in to change notification settings

xdemonx/android-codequality-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

android-codequality-sample

Gradle sample for android project with lint, checkstyle, findbugs and pmd.

Usage

  1. Put codequality directory into directory of your root project
  2. Add to build.gradle of any java-project next line:
apply from: "${rootProject.projectDir}/codequality/codequality.gradle"

If you want to use it for android-project, add next two lines:

apply from: "${rootProject.projectDir}/codequality/codequality.gradle"
apply from: "${rootProject.projectDir}/codequality/codequality-android.gradle"

Also you can add to root build.gradle for applying for all modules:

subprojects {
    apply plugin: 'com.android.application'
    apply from: "${rootProject.projectDir}/codequality/codequality.gradle"
    apply from: "${rootProject.projectDir}/codequality/codequality-android.gradle"
}
  1. Runnig. You can run single check:
./gradlew checkstyleMain
./gradlew pmdMain
./gradlew lintRelease
./gradlew findbugsTest
./gradlew lint
./gradlew pmd

Or you can run all checks (exclude test)

./gradlew check -x test
  1. All reports will be placed in
${rootProject.buildDir}/reports/${analyzerName}/${project.name}/$htmlReportFileName

For example:

build/reports/lint/my-application/lint.html
build/reports/findbugs/my-application/main.html

About

Gradle sample for android project with lint, checkstyle, findbugs and pmd.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published