diff options
-rw-r--r-- | app/build.gradle | 1 | ||||
-rw-r--r-- | config/quality.gradle | 16 | ||||
-rw-r--r-- | config/quality/checkstyle/checkstyle.xml | 14 |
3 files changed, 31 insertions, 0 deletions
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 @@ +<?xml version="1.0"?> +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.3//EN" + "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> +<module name="Checker"> + <module name="TreeWalker"> + <property name="fileExtensions" value="java"/> + <module name="RegexpSinglelineJava"> + <property name="format" value="^\t* +\t*\S"/> + <property name="message" value="Line has leading space characters; indentation should be performed with tabs only."/> + <property name="ignoreComments" value="true"/> + </module> + </module> +</module> |