From ac85ede9a3df280ad62df90800e1a9dc9af6290d Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Wed, 1 Oct 2014 23:44:57 +0100 Subject: Add Checkstyle checks --- app/build.gradle | 1 + config/quality.gradle | 16 ++++++++++++++++ config/quality/checkstyle/checkstyle.xml | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 config/quality.gradle create mode 100644 config/quality/checkstyle/checkstyle.xml diff --git a/app/build.gradle b/app/build.gradle index da30621..880d54b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'android-sdk-manager' apply plugin: 'com.android.application' +apply from: '../config/quality.gradle' android { compileSdkVersion 20 diff --git a/config/quality.gradle b/config/quality.gradle new file mode 100644 index 0000000..f93b4a1 --- /dev/null +++ b/config/quality.gradle @@ -0,0 +1,16 @@ +apply plugin: 'checkstyle' + +check.dependsOn 'checkstyle' + +task checkstyle(type: Checkstyle) { + configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml") + + source 'src/main/java' + include 'org/connectbot/**/*.java' + exclude '**/gen/**' + + def configProps = ['proj.module.dir': projectDir.absolutePath] + configProperties configProps + + classpath = files() +} diff --git a/config/quality/checkstyle/checkstyle.xml b/config/quality/checkstyle/checkstyle.xml new file mode 100644 index 0000000..aa27675 --- /dev/null +++ b/config/quality/checkstyle/checkstyle.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + -- cgit v1.2.3