File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
base/code-generator-model
plugins/common/src/main/kotlin Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change
1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
+
1
3
plugins {
2
4
`kotlin- dsl`
3
5
}
6
+
7
+ java {
8
+ sourceCompatibility = JavaVersion .VERSION_17
9
+ targetCompatibility = JavaVersion .VERSION_17
10
+ }
11
+
12
+ kotlin {
13
+ compilerOptions.jvmTarget = JvmTarget .JVM_17
14
+ }
Original file line number Diff line number Diff line change @@ -253,13 +253,13 @@ tasks {
253
253
}
254
254
255
255
afterEvaluate {
256
+ java {
257
+ // For Groovy and Shadow plugins
258
+ sourceCompatibility = extension.mainJavaVersion.get()
259
+ targetCompatibility = extension.mainJavaVersion.get()
260
+ }
256
261
pluginManager.withPlugin(" groovy" ) {
257
- tasks.named<GroovyCompile >(" compileGroovy" ).configure {
258
- // Groovy compiler does not support the --release flag.
259
- sourceCompatibility = extension.mainJavaVersion.get().majorVersion
260
- targetCompatibility = extension.mainJavaVersion.get().majorVersion
261
- }
262
- tasks.named<GroovyCompile >(" compileTestGroovy" ).configure {
262
+ tasks.withType<GroovyCompile >().named { it.startsWith(" compileTest" ) }.configureEach {
263
263
// Groovy compiler does not support the --release flag.
264
264
sourceCompatibility = extension.testJavaVersion.get().majorVersion
265
265
targetCompatibility = extension.testJavaVersion.get().majorVersion
You can’t perform that action at this time.
0 commit comments