File tree Expand file tree Collapse file tree 4 files changed +25
-17
lines changed
Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Original file line number Diff line number Diff line change 11plugins {
22 `kotlin- dsl`
3- kotlin(" jvm" ) version " 2.1.10 "
3+ kotlin(" jvm" ) version " 1.9.20 "
44 id(" com.vanniktech.maven.publish" ) version " 0.28.0"
55}
66
@@ -11,6 +11,6 @@ repositories {
1111
1212dependencies {
1313 implementation(" com.diffplug.spotless:spotless-plugin-gradle:7.0.2" )
14- implementation(" org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.10 " )
14+ implementation(" org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20 " )
1515 implementation(" com.vanniktech:gradle-maven-publish-plugin:0.28.0" )
1616}
Original file line number Diff line number Diff line change 2323 toolchain {
2424 languageVersion.set(JavaLanguageVersion .of(17 ))
2525 }
26+
27+ sourceCompatibility = JavaVersion .VERSION_1_8
28+ targetCompatibility = JavaVersion .VERSION_1_8
2629}
2730
2831tasks.withType<JavaCompile >().configureEach {
Original file line number Diff line number Diff line change 11import com.diffplug.gradle.spotless.SpotlessExtension
22import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
44
55plugins {
66 id(" orb.java" )
@@ -11,25 +11,26 @@ kotlin {
1111 jvmToolchain {
1212 languageVersion.set(JavaLanguageVersion .of(17 ))
1313 }
14- }
15-
16- configure<SpotlessExtension > {
17- kotlin {
18- ktfmt().kotlinlangStyle()
19- toggleOffOn()
20- }
21- }
2214
23- tasks.withType<KotlinCompile >().configureEach {
2415 compilerOptions {
25- allWarningsAsErrors = true
2616 freeCompilerArgs = listOf (
2717 " -Xjvm-default=all" ,
2818 " -Xjdk-release=1.8" ,
2919 // Suppress deprecation warnings because we may still reference and test deprecated members.
30- " -Xsuppress-warning=DEPRECATION"
20+ // TODO: Replace with `-Xsuppress-warning=DEPRECATION` once we use Kotlin compiler 2.1.0+.
21+ " -nowarn" ,
3122 )
3223 jvmTarget.set(JvmTarget .JVM_1_8 )
24+ languageVersion.set(KotlinVersion .KOTLIN_1_8 )
25+ apiVersion.set(KotlinVersion .KOTLIN_1_8 )
26+ coreLibrariesVersion = " 1.8.0"
27+ }
28+ }
29+
30+ configure<SpotlessExtension > {
31+ kotlin {
32+ ktfmt().kotlinlangStyle()
33+ toggleOffOn()
3334 }
3435}
3536
Original file line number Diff line number Diff line change 11plugins {
2- id(" orb.kotlin" )
32 id(" java" )
43 application
54}
65
6+ repositories {
7+ mavenCentral()
8+ }
9+
710dependencies {
811 implementation(project(" :orb-java" ))
912}
1013
11- tasks.withType< JavaCompile >().configureEach {
14+ java {
1215 // Allow using more modern APIs, like `List.of` and `Map.of`, in examples.
13- options.release.set(9 )
16+ sourceCompatibility = JavaVersion .VERSION_1_9
17+ targetCompatibility = JavaVersion .VERSION_1_9
1418}
1519
1620application {
You can’t perform that action at this time.
0 commit comments