Index: libadblockplus-android/build.gradle |
diff --git a/libadblockplus-android/build.gradle b/libadblockplus-android/build.gradle |
index 069c44cf739f2aac8e3843c5d92bd7b4f7ee2e61..f4fe2f37a3064c60ba54d9b342149c977d3a2f63 100644 |
--- a/libadblockplus-android/build.gradle |
+++ b/libadblockplus-android/build.gradle |
@@ -1,32 +1,54 @@ |
apply plugin: 'com.android.library' |
+apply plugin: 'checkstyle' |
android { |
- compileSdkVersion 16 |
- buildToolsVersion "25.0.0" |
+ compileSdkVersion 16 |
+ buildToolsVersion "25.0.0" |
- defaultConfig { |
- minSdkVersion 11 |
- targetSdkVersion 16 |
- versionCode 1 |
- versionName "1.0" |
+ defaultConfig { |
+ minSdkVersion 11 |
+ targetSdkVersion 16 |
+ versionCode 1 |
+ versionName "1.0" |
- ndk { |
- abiFilters 'armeabi-v7a', 'x86' |
+ ndk { |
+ abiFilters 'armeabi-v7a', 'x86' |
+ } |
} |
- } |
- externalNativeBuild { |
- ndkBuild { |
- path 'jni/Android.mk' |
+ externalNativeBuild { |
+ ndkBuild { |
+ path 'jni/Android.mk' |
+ } |
} |
- } |
- sourceSets { |
- main { |
- manifest.srcFile 'AndroidManifest.xml' |
- java.srcDirs = ['src'] |
- res.srcDirs = ['res'] |
- jni.srcDirs = ['jni'] |
+ sourceSets { |
+ main { |
+ manifest.srcFile 'AndroidManifest.xml' |
+ java.srcDirs = ['src'] |
+ res.srcDirs = ['res'] |
+ jni.srcDirs = ['jni'] |
+ } |
} |
- } |
+} |
+ |
+checkstyle { |
+ toolVersion = '6.19' |
+} |
+ |
+task checkstyleMain(type: Checkstyle) { |
+ ignoreFailures = true |
+ showViolations = true |
+ source 'src/org/adblockplus/' |
+ exclude '**/gen/**' |
+ exclude '**/R.java' |
+ exclude '**/BuildConfig.java' |
+ reports { |
+ xml.destination "$project.buildDir/reports/checkstyle/main.xml" |
+ } |
+ classpath = files() |
+ configFile = file("${rootProject.rootDir}/third_party/checkstyle/java/rules/eyeo_production_checks.xml") |
+ configProperties = [ |
+ "checkstyle.header.file" : file("${rootProject.rootDir}/third_party/checkstyle/java/res/header.txt") |
+ ] |
} |