mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-04-26 02:08:02 -04:00
Rudimentary migration of findbugs to spotbugs
This commit is contained in:
4
.github/workflows/android.yml
vendored
4
.github/workflows/android.yml
vendored
@@ -23,5 +23,5 @@ jobs:
|
||||
run: ./gradlew lintRelease
|
||||
- name: Run unit tests
|
||||
run: ./gradlew testReleaseUnitTest
|
||||
- name: FindBugs
|
||||
run: ./gradlew findbugs
|
||||
- name: SpotBugs
|
||||
run: ./gradlew spotbugs
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'findbugs'
|
||||
import com.github.spotbugs.snom.SpotBugsTask
|
||||
|
||||
findbugs {
|
||||
sourceSets = []
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.github.spotbugs'
|
||||
|
||||
spotbugs {
|
||||
ignoreFailures = false
|
||||
effort = 'max'
|
||||
excludeFilter = file("./config/spotbugs/exclude.xml")
|
||||
reportsDir = file("$buildDir/reports/spotbugs/")
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -73,18 +77,14 @@ dependencies {
|
||||
testImplementation 'org.robolectric:robolectric:4.0.2'
|
||||
}
|
||||
|
||||
task findbugs(type: FindBugs, dependsOn: 'assembleDebug') {
|
||||
tasks.withType(SpotBugsTask) {
|
||||
|
||||
description 'Run findbugs'
|
||||
description 'Run spotbugs'
|
||||
group 'verification'
|
||||
|
||||
classes = fileTree('build/intermediates/javac/debug/compileDebugJavaWithJavac/classes')
|
||||
source = fileTree('src/main/java')
|
||||
classpath = files()
|
||||
|
||||
effort = 'max'
|
||||
|
||||
excludeFilter = file("./config/findbugs/exclude.xml")
|
||||
//classes = fileTree('build/intermediates/javac/debug/compileDebugJavaWithJavac/classes')
|
||||
//source = fileTree('src/main/java')
|
||||
//classpath = files()
|
||||
|
||||
reports {
|
||||
xml.enabled = false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<FindBugsFilter>
|
||||
<SpotBugsFilter>
|
||||
|
||||
<Match>
|
||||
<Class name="~.*R\$.*"/>
|
||||
@@ -7,4 +7,4 @@
|
||||
<Class name="~.*Manifest\$.*"/>
|
||||
</Match>
|
||||
|
||||
</FindBugsFilter>
|
||||
</SpotBugsFilter>
|
||||
@@ -5,10 +5,12 @@ buildscript {
|
||||
google()
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
||||
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.6.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@@ -20,6 +22,7 @@ allprojects {
|
||||
google()
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user