Created
June 29, 2016 03:15
-
-
Save robints/acfefd19337edde6e10a7c96bbbcc20a to your computer and use it in GitHub Desktop.
Revisions
-
robints created this gist
Jun 29, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ apply plugin: 'checkstyle' checkstyle { configFile rootProject.file('checkstyle.xml') showViolations true } android.libraryVariants.all { variant -> def name = variant.buildType.name def checkstyle = project.tasks.create "checkstyle${name.capitalize()}", Checkstyle checkstyle.dependsOn variant.javaCompile checkstyle.source variant.javaCompile.source checkstyle.classpath = project.fileTree(variant.javaCompile.destinationDir) checkstyle.exclude('**/BuildConfig.java') checkstyle.exclude('**/R.java') project.tasks.getByName("check").dependsOn checkstyle }