From 471f1df160d247e742b265adc136570792d2cd2d Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 1 Sep 2014 00:29:48 +0200 Subject: [PATCH] Use checkstyle to monitor code quality --- build.gradle | 11 +++ config/checkstyle/checkstyle.xml | 149 +++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 config/checkstyle/checkstyle.xml diff --git a/build.gradle b/build.gradle index 4c57f3c49..331d3fc76 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,7 @@ buildscript { apply plugin: 'android-sdk-manager' apply plugin: 'com.android.application' +apply plugin: 'checkstyle' repositories { jcenter() @@ -72,6 +73,16 @@ android { } } +check.dependsOn 'checkstyle' +task checkstyle(type: Checkstyle) { + ignoreFailures = true + configFile file("config/checkstyle/checkstyle.xml") + + source 'src' + include '**/*.java' + classpath = files() +} + task testsOnJVM(type :GradleBuild, dependsOn: assemble) { buildFile = 'tests-on-jvm/build.gradle' tasks = ['test'] diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 000000000..7b0a8b796 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file