1
1
import com.android.build.gradle.internal.tasks.factory.dependsOn
2
- import com.github.spotbugs.snom.SpotBugsTask
3
2
4
3
plugins {
5
4
id(" com.android.application" )
6
- id(" com.github.spotbugs" )
7
5
id(" org.jetbrains.kotlin.android" )
8
6
}
9
7
10
- spotbugs {
11
- ignoreFailures.set(false )
12
- setEffort(" max" )
13
- excludeFilter.set(file(" ./config/spotbugs/exclude.xml" ))
14
- reportsDir.set(layout.buildDirectory.file(" reports/spotbugs/" ).get().asFile)
8
+ kotlin {
9
+ jvmToolchain(21 )
15
10
}
16
11
17
12
android {
@@ -104,7 +99,11 @@ android {
104
99
lintConfig = file(" lint.xml" )
105
100
}
106
101
kotlinOptions {
107
- jvmTarget = " 17"
102
+ jvmTarget = " 21"
103
+ }
104
+ compileOptions {
105
+ sourceCompatibility = JavaVersion .VERSION_21
106
+ targetCompatibility = JavaVersion .VERSION_21
108
107
}
109
108
}
110
109
@@ -128,9 +127,6 @@ dependencies {
128
127
implementation(" com.jaredrummler:colorpicker:1.1.0" )
129
128
implementation(" net.lingala.zip4j:zip4j:2.11.5" )
130
129
131
- // SpotBugs
132
- implementation(" io.wcm.tooling.spotbugs:io.wcm.tooling.spotbugs.annotations:1.0.0" )
133
-
134
130
// Testing
135
131
val androidXTestVersion = " 1.6.1"
136
132
val junitVersion = " 4.13.2"
@@ -146,18 +142,6 @@ dependencies {
146
142
androidTestImplementation(" androidx.test.espresso:espresso-core:3.6.1" )
147
143
}
148
144
149
- tasks.withType<SpotBugsTask >().configureEach {
150
- description = " Run spotbugs"
151
- group = " verification"
152
-
153
- // classes = fileTree("build/intermediates/javac/debug/compileDebugJavaWithJavac/classes")
154
- // source = fileTree("src/main/java")
155
- // classpath = files()
156
-
157
- reports.maybeCreate(" xml" ).required.set(false )
158
- reports.maybeCreate(" html" ).required.set(true )
159
- }
160
-
161
145
tasks.register(" copyRawResFiles" , Copy ::class ) {
162
146
from(
163
147
layout.projectDirectory.file(" ../CHANGELOG.md" ),
0 commit comments