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

Unified Diff: libadblockplus-android/build.gradle

Issue 29347926: Issue 4248 - Add codestyle check
Patch Set: fixed broken url in rules Created April 28, 2017, 5:55 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
« no previous file with comments | « libadblockplus-android-webviewapp/build.gradle ('k') | third_party/checkstyle/java/res/header.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libadblockplus-android/build.gradle
diff --git a/libadblockplus-android/build.gradle b/libadblockplus-android/build.gradle
index 069c44cf739f2aac8e3843c5d92bd7b4f7ee2e61..f349bf1583ab5ebc9975db5f253270c9c2491874 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_checks.xml")
+ configProperties = [
+ "checkstyle.header.file" : file("${rootProject.rootDir}/third_party/checkstyle/java/res/header.txt")
+ ]
}
« no previous file with comments | « libadblockplus-android-webviewapp/build.gradle ('k') | third_party/checkstyle/java/res/header.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld