Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android-webview/build.gradle

Issue 29347926: Issue 4248 - Add codestyle check
Patch Set: added Gradle support, removed Ant support, added original files URLs Created April 14, 2017, 11:56 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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")
+ ]
}

Powered by Google App Engine
This is Rietveld