Index: libadblockplus-android-webview/build.gradle |
diff --git a/libadblockplus-android-webview/build.gradle b/libadblockplus-android-webview/build.gradle |
index 1cbffdb5ab39927ea857c32072e2c25d5df53e6b..46cd16575077a94a43b7d60430a15ee7173cc024 100644 |
--- a/libadblockplus-android-webview/build.gradle |
+++ b/libadblockplus-android-webview/build.gradle |
@@ -1,33 +1,55 @@ |
apply plugin: 'com.android.library' |
+apply plugin: 'checkstyle' |
android { |
- compileSdkVersion 21 |
- buildToolsVersion "25.0.0" |
+ compileSdkVersion 21 |
+ buildToolsVersion "25.0.0" |
- defaultConfig { |
- minSdkVersion 21 |
- targetSdkVersion 21 |
- versionCode 1 |
- versionName "1.0" |
- } |
+ defaultConfig { |
+ minSdkVersion 21 |
+ targetSdkVersion 21 |
+ versionCode 1 |
+ versionName "1.0" |
+ } |
- sourceSets { |
- main { |
- manifest.srcFile 'AndroidManifest.xml' |
- java.srcDirs = ['src'] |
- resources.srcDirs = ['src'] |
- res.srcDirs = ['res'] |
- assets.srcDirs = ['assets'] |
+ sourceSets { |
+ main { |
+ manifest.srcFile 'AndroidManifest.xml' |
+ java.srcDirs = ['src'] |
+ resources.srcDirs = ['src'] |
+ res.srcDirs = ['res'] |
+ assets.srcDirs = ['assets'] |
- jni { |
- dependencies { |
- project ":libadblockplus-android" |
+ jni { |
+ dependencies { |
+ project ":libadblockplus-android" |
+ } |
+ } |
} |
- } |
} |
- } |
} |
dependencies { |
compile project(':libadblockplus-android') |
+} |
+ |
+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_checks.xml") |
+ configProperties = [ |
+ "checkstyle.header.file" : file("${rootProject.rootDir}/third_party/checkstyle/java/res/header.txt") |
+ ] |
} |