diff --git a/app/build.gradle b/app/build.gradle index 819765113..17800280d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: 'checkstyle' task wrapper(type: Wrapper) { gradleVersion = '4.6' @@ -82,6 +83,26 @@ android { } } +task checkstyle(type: Checkstyle) { + source fileTree('src/main/java') + include '**/*.java' + exclude '**/gen/**' + + classpath = files() + showViolations true + + reports { + xml.enabled = true + html.enabled = true + html.destination = "$project.buildDir/reports/checkstyle/checkstyle.html" + } +} + +checkstyle { + configFile project.file('google_checks.xml') + toolVersion = '8.8' +} + configurations { all*.exclude group: 'com.google.guava', module: 'guava-jdk5' all*.exclude group: 'org.apache.httpcomponents', module: 'httpclient' diff --git a/app/google_checks.xml b/app/google_checks.xml new file mode 100644 index 000000000..04286da6e --- /dev/null +++ b/app/google_checks.xml @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +