mirror of https://github.com/moparisthebest/k-9
Run checkstyle and findbugs on k9mail-library
This commit is contained in:
parent
105bca735b
commit
52b3974c4f
|
@ -0,0 +1,12 @@
|
||||||
|
apply plugin: 'checkstyle'
|
||||||
|
|
||||||
|
check.dependsOn 'checkstyle'
|
||||||
|
task checkstyle(type: Checkstyle) {
|
||||||
|
ignoreFailures = true
|
||||||
|
configFile file("$rootProject.projectDir/config/checkstyle/checkstyle.xml")
|
||||||
|
|
||||||
|
source = project.android.sourceSets.main.java.getSrcDirs() +
|
||||||
|
project.android.sourceSets.androidTest.java.getSrcDirs()
|
||||||
|
include '**/*.java'
|
||||||
|
classpath = files()
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apply plugin: 'findbugs'
|
||||||
|
|
||||||
|
check.dependsOn 'findbugs'
|
||||||
|
task findbugs(type: FindBugs, dependsOn: ['compileDebugJava', 'compileDebugTestJava']) {
|
||||||
|
ignoreFailures = true
|
||||||
|
classes = fileTree('build/intermediates/classes/debug/') +
|
||||||
|
fileTree('build/intermediates/classes/test/debug/')
|
||||||
|
source = project.android.sourceSets.main.java.getSrcDirs() +
|
||||||
|
project.android.sourceSets.androidTest.java.getSrcDirs()
|
||||||
|
classpath = files()
|
||||||
|
effort = 'max'
|
||||||
|
includeFilter = file("$rootProject.projectDir/config/findbugs/include_filter.xml")
|
||||||
|
excludeFilter = file("$rootProject.projectDir/config/findbugs/exclude_filter.xml")
|
||||||
|
}
|
|
@ -1,4 +1,6 @@
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
apply from: '../gradle/plugins/checkstyle-android.gradle'
|
||||||
|
apply from: '../gradle/plugins/findbugs-android.gradle'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
apply plugin: 'android-sdk-manager'
|
apply plugin: 'android-sdk-manager'
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'checkstyle'
|
apply from: '../gradle/plugins/checkstyle-android.gradle'
|
||||||
apply plugin: 'findbugs'
|
apply from: '../gradle/plugins/findbugs-android.gradle'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
@ -64,30 +64,6 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
check.dependsOn 'checkstyle'
|
|
||||||
task checkstyle(type: Checkstyle) {
|
|
||||||
ignoreFailures = true
|
|
||||||
configFile file("$rootProject.projectDir/config/checkstyle/checkstyle.xml")
|
|
||||||
|
|
||||||
source = project.android.sourceSets.main.java.getSrcDirs() +
|
|
||||||
project.android.sourceSets.androidTest.java.getSrcDirs()
|
|
||||||
include '**/*.java'
|
|
||||||
classpath = files()
|
|
||||||
}
|
|
||||||
|
|
||||||
check.dependsOn 'findbugs'
|
|
||||||
task findbugs(type: FindBugs, dependsOn: ['compileDebugJava', 'compileDebugTestJava']) {
|
|
||||||
ignoreFailures = true
|
|
||||||
classes = fileTree('build/intermediates/classes/debug/') +
|
|
||||||
fileTree('build/intermediates/classes/test/debug/')
|
|
||||||
source = project.android.sourceSets.main.java.getSrcDirs() +
|
|
||||||
project.android.sourceSets.androidTest.java.getSrcDirs()
|
|
||||||
classpath = files()
|
|
||||||
effort = 'max'
|
|
||||||
includeFilter = file("$rootProject.projectDir/config/findbugs/include_filter.xml")
|
|
||||||
excludeFilter = file("$rootProject.projectDir/config/findbugs/exclude_filter.xml")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty('keyAlias')) {
|
if (project.hasProperty('keyAlias')) {
|
||||||
android.signingConfigs.release.keyAlias = keyAlias
|
android.signingConfigs.release.keyAlias = keyAlias
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue