diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle
index fff80e5b6..7c76e0227 100644
--- a/platform/android/MapboxGLAndroidSDK/build.gradle
+++ b/platform/android/MapboxGLAndroidSDK/build.gradle
@@ -102,11 +102,6 @@ android.libraryVariants.all { variant ->
}
}
-checkstyle {
- configFile project.file('../checks.xml')
- showViolations true
-}
-
/*
task cleanJNIBuilds {
def jniLibsDir = new File("MapboxGLAndroidSDK/src/main/jniLibs")
diff --git a/platform/android/build.gradle b/platform/android/build.gradle
index 644986a74..aed761c83 100644
--- a/platform/android/build.gradle
+++ b/platform/android/build.gradle
@@ -18,6 +18,8 @@ allprojects {
}
}
+apply from: 'checkstyle.gradle'
+
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
diff --git a/platform/android/checks.xml b/platform/android/checks.xml
deleted file mode 100644
index 0ee271678..000000000
--- a/platform/android/checks.xml
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/platform/android/checkstyle.gradle b/platform/android/checkstyle.gradle
new file mode 100644
index 000000000..69f7f41ff
--- /dev/null
+++ b/platform/android/checkstyle.gradle
@@ -0,0 +1,16 @@
+apply plugin: 'checkstyle'
+
+checkstyle.toolVersion = '7.1'
+
+task checkstyle(type: Checkstyle) {
+ description 'Checks if the code adheres to coding standards'
+ group 'verification'
+
+ configFile = new File(rootDir, "checkstyle.xml")
+ source 'src'
+ include '**/*.java'
+ exclude '**/gen/**'
+
+ classpath = files()
+ ignoreFailures = false
+}
diff --git a/platform/android/checkstyle.xml b/platform/android/checkstyle.xml
new file mode 100644
index 000000000..3b4fba7b2
--- /dev/null
+++ b/platform/android/checkstyle.xml
@@ -0,0 +1,217 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+