Skip to content

Commit 7c44a3e

Browse files
committed
Upgrade Kotlin library to 2.2.20.
1 parent c4065b7 commit 7c44a3e

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ How to get your contributions merged smoothly and quickly.
3434
- Provide a good **PR description** as a record of **what** change is being made
3535
and **why** it was made. Link to a GitHub issue if it exists.
3636

37-
- Run `bazelisk run //:format` to fix code style and formatting before committing.
37+
- Run `bazelisk run @format//:format` to fix code style and formatting before committing.
3838
PRs with invalid format won't be merged. If you do want to support formatting for a new language, do that in a separate commit before adding another commit that reformats all relevant files.
3939

4040
- If you are adding a new file, make sure it has the copyright message template

build.gradle.kts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
22
import org.gradle.api.tasks.testing.logging.TestLogEvent
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
45

56
plugins {
@@ -37,10 +38,10 @@ subprojects {
3738
targetCompatibility = JavaVersion.VERSION_17.toString()
3839
}
3940

40-
tasks.withType<KotlinCompile> {
41-
kotlinOptions {
42-
freeCompilerArgs = listOf("-Xjsr305=strict")
43-
jvmTarget = JavaVersion.VERSION_17.toString()
41+
tasks.withType<KotlinCompile>().configureEach {
42+
compilerOptions {
43+
freeCompilerArgs.add("-Xjsr305=strict")
44+
jvmTarget.set(JvmTarget.JVM_17)
4445
}
4546
}
4647

examples/gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[plugins]
22
android-application = { id = "com.android.application", version = "8.3.0" }
33
android-library = { id = "com.android.library", version = "8.3.0" }
4-
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version = "2.1.20" }
5-
kotlin-android = { id = "org.jetbrains.kotlin.android", version = "2.1.20" }
4+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version = "2.2.20" }
5+
kotlin-android = { id = "org.jetbrains.kotlin.android", version = "2.2.20" }
66
protobuf = { id = "com.google.protobuf", version = "0.9.5" }
77
palantir-graal = { id = "com.palantir.graal", version = "0.12.0" }
88
jib = { id = "com.google.cloud.tools.jib", version = "3.4.1" }

examples/stub-android/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ android {
2323
namespace = "io.grpc.examples.stublite"
2424
}
2525

26-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
27-
kotlinOptions { freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn") }
26+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
27+
compilerOptions { freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn") }
2828
}
2929

3030
protobuf {

examples/stub-lite/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ dependencies {
1616

1717
kotlin { jvmToolchain(17) }
1818

19-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
20-
kotlinOptions { freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn") }
19+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
20+
compilerOptions { freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn") }
2121
}
2222

2323
protobuf {

examples/stub/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ dependencies {
1717

1818
kotlin { jvmToolchain(17) }
1919

20-
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
21-
kotlinOptions { freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn") }
20+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
21+
compilerOptions { freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn") }
2222
}
2323

2424
protobuf {

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[plugins]
2-
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version = "2.1.20" }
2+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version = "2.2.20" }
33
protobuf = { id = "com.google.protobuf", version = "0.9.5" }
44
test-retry = { id = "org.gradle.test-retry", version = "1.5.7" }
55
publish-plugin = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }

0 commit comments

Comments
 (0)