|
@@ -21,7 +21,7 @@ buildscript {
|
|
dependencies {
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:7.0.3'
|
|
classpath 'com.android.tools.build:gradle:7.0.3'
|
|
classpath 'com.hiya:jacoco-android:0.2'
|
|
classpath 'com.hiya:jacoco-android:0.2'
|
|
- classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5'
|
|
|
|
|
|
+ classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.9'
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.1"
|
|
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.1"
|
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
|
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
|
|
@@ -224,26 +224,6 @@ android {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- android.applicationVariants.all { variant ->
|
|
|
|
- String variantName = variant.name
|
|
|
|
- String capVariantName = variantName.substring(0, 1).toUpperCase() + 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.enabled = false
|
|
|
|
- html {
|
|
|
|
- enabled = true
|
|
|
|
- destination = file("$project.buildDir/reports/spotbugs/spotbugs.html")
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
check.dependsOn 'checkstyle', 'spotbugsGplayDebugReport', 'pmd', 'lint', 'ktlint', 'detekt'
|
|
check.dependsOn 'checkstyle', 'spotbugsGplayDebugReport', 'pmd', 'lint', 'ktlint', 'detekt'
|
|
|
|
|
|
buildFeatures {
|
|
buildFeatures {
|
|
@@ -472,3 +452,26 @@ shot {
|
|
jacoco {
|
|
jacoco {
|
|
toolVersion = "$jacoco_version"
|
|
toolVersion = "$jacoco_version"
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+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 = files("$project.buildDir/intermediates/javac/${variantName}")
|
|
|
|
+ reports {
|
|
|
|
+ xml.enabled = false
|
|
|
|
+ html {
|
|
|
|
+ enabled = true
|
|
|
|
+ destination = file("$project.buildDir/reports/spotbugs/spotbugs.html")
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|