File tree Expand file tree Collapse file tree 5 files changed +28
-3
lines changed
src/main/kotlin/dev/whosnickdoglio/buildlogic Expand file tree Collapse file tree 5 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ inputs:
7
7
runs :
8
8
using : " composite"
9
9
steps :
10
- - name : set up JDK 21
10
+ - name : set up JDK 22
11
11
uses : actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
12
12
with :
13
13
distribution : ' zulu'
14
- java-version : ' 21 '
14
+ java-version : ' 22 '
15
15
- name : Setup Gradle
16
16
uses : gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3
17
17
with :
Original file line number Diff line number Diff line change
1
+ import io.gitlab.arturbosch.detekt.Detekt
1
2
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
3
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
4
@@ -66,6 +67,8 @@ spotless {
66
67
}
67
68
}
68
69
70
+ tasks.withType<Detekt >().configureEach { jvmTarget = JvmTarget .JVM_17 .target }
71
+
69
72
tasks.withType<KotlinCompile >().configureEach {
70
73
compilerOptions {
71
74
allWarningsAsErrors = true
Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ import dev.whosnickdoglio.buildlogic.configuration.configureSpotless
11
11
import dev.whosnickdoglio.buildlogic.configuration.configureTests
12
12
import dev.whosnickdoglio.buildlogic.configuration.dependOnBuildLogicTask
13
13
import dev.whosnickdoglio.buildlogic.configuration.getVersionCatalog
14
+ import io.gitlab.arturbosch.detekt.Detekt
14
15
import org.gradle.api.Plugin
15
16
import org.gradle.api.Project
17
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
16
18
17
19
class RulesPlugin : Plugin <Project > {
18
20
override fun apply (target : Project ) {
@@ -30,6 +32,10 @@ class RulesPlugin : Plugin<Project> {
30
32
dependOnBuildLogicTask(" sortDependencies" )
31
33
dependOnBuildLogicTask(" checkSortDependencies" )
32
34
35
+ tasks.withType(Detekt ::class .java).configureEach {
36
+ it.jvmTarget = JvmTarget .JVM_17 .target
37
+ }
38
+
33
39
configureJvm(libs.findVersion(" jdk" ).get().requiredVersion.toInt())
34
40
configureLint()
35
41
configureSpotless(libs.findVersion(" ktlint" ).get().requiredVersion)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ lint = "31.5.0"
7
7
detekt = " 1.23.6"
8
8
kover = " 0.8.2"
9
9
spotless = " 6.25.0"
10
- jdk = " 21 "
10
+ jdk = " 22 "
11
11
sort = " 0.6"
12
12
dagger = " 2.51.1"
13
13
Original file line number Diff line number Diff line change
1
+ import io.gitlab.arturbosch.detekt.Detekt
2
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
1
3
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
2
4
import org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask
3
5
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -106,6 +108,20 @@ spotless {
106
108
}
107
109
}
108
110
111
+ tasks.withType<Detekt >().configureEach { jvmTarget = " 17" }
112
+
113
+ tasks.withType<KotlinCompile >().configureEach {
114
+ compilerOptions {
115
+ allWarningsAsErrors = true
116
+ jvmTarget = JvmTarget .JVM_17
117
+ }
118
+ }
119
+
120
+ tasks.withType<JavaCompile >().configureEach {
121
+ sourceCompatibility = JavaVersion .VERSION_17 .toString()
122
+ targetCompatibility = JavaVersion .VERSION_17 .toString()
123
+ }
124
+
109
125
dependencies {
110
126
coreLibraryDesugaring(libs.desugar)
111
127
You can’t perform that action at this time.
0 commit comments