mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
update spotbugs config
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
9fdc1c2a6e
commit
d7807f64d3
1 changed files with 26 additions and 23 deletions
|
@ -120,29 +120,6 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
String variantName = variant.name
|
||||
String capVariantName = variantName.substring(0, 1).toUpperCase(Locale.ROOT) + variantName.substring(1)
|
||||
tasks.register("spotbugs${capVariantName}Report", SpotBugsTask) {
|
||||
ignoreFailures = true // should continue checking
|
||||
effort = "max"
|
||||
reportLevel = "medium"
|
||||
classes = fileTree("$project.buildDir/intermediates/javac/${variantName}/classes/")
|
||||
excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")
|
||||
|
||||
reports {
|
||||
xml {
|
||||
required = true
|
||||
}
|
||||
html {
|
||||
required = true
|
||||
outputLocation = file("$project.buildDir/reports/spotbugs/spotbugs.html")
|
||||
stylesheet = 'fancy.xsl'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
check.dependsOn 'spotbugsGplayDebug', 'lint', 'ktlintCheck', 'detekt'
|
||||
|
||||
compileOptions {
|
||||
|
@ -349,6 +326,32 @@ task installGitHooks(type: Copy, group: "development") {
|
|||
into '../.git/hooks'
|
||||
}
|
||||
|
||||
spotbugs {
|
||||
ignoreFailures = true // should continue checking
|
||||
effort = "max"
|
||||
reportLevel = "medium"
|
||||
}
|
||||
|
||||
tasks.withType(SpotBugsTask) { task ->
|
||||
String variantNameCap = task.name.replace("spotbugs", "")
|
||||
String variantName = variantNameCap.substring(0, 1).toLowerCase() + variantNameCap.substring(1)
|
||||
|
||||
dependsOn "compile${variantNameCap}Sources"
|
||||
|
||||
excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")
|
||||
classes = fileTree("$project.buildDir/intermediates/javac/${variantName}/classes/")
|
||||
reports {
|
||||
xml {
|
||||
required = true
|
||||
}
|
||||
html {
|
||||
required = true
|
||||
outputLocation = file("$project.buildDir/reports/spotbugs/spotbugs.html")
|
||||
stylesheet = 'fancy.xsl'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("detekt").configure {
|
||||
reports {
|
||||
html.required.set(true)
|
||||
|
|
Loading…
Reference in a new issue