diff --git a/app/build.gradle b/app/build.gradle index 898068b40..861dea5fb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply from: 'quality.gradle' dependencies { compile ('com.github.nicolas-raoul:Quadtree:211b6fe59ac48f') { diff --git a/app/quality.gradle b/app/quality.gradle new file mode 100644 index 000000000..e4cdd64e7 --- /dev/null +++ b/app/quality.gradle @@ -0,0 +1,23 @@ +apply plugin: 'checkstyle' + +check.dependsOn 'checkstyle' + +checkstyle { + toolVersion = '7.5.1' +} + +task checkstyle(type: Checkstyle) { + configFile file("${project.rootDir}/script/style/checkstyle.xml") + source 'src' + include '**/*.java' + exclude '**/gen/**' + + classpath = files() + + reports { + html { + enabled true + destination "$project.buildDir/reports/checkstyle/checkstyle.html" + } + } +} diff --git a/script/style/checkstyle.xml b/script/style/checkstyle.xml new file mode 100644 index 000000000..baebde870 --- /dev/null +++ b/script/style/checkstyle.xml @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +