Skip to content

Commit d8d66d8

Browse files
Update dependency java to v23 (#3301)
* Update dependency java to v23 * Set target explicilty on tests with JVM Kotlin Otherwise it inherits the build JDK, and sometimes that is newer than what Kotlin supports. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jake Wharton <[email protected]>
1 parent 7087c9a commit d8d66d8

File tree

13 files changed

+164
-2
lines changed

13 files changed

+164
-2
lines changed

.github/workflows/.java-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19
1+
23

wire-gradle-plugin/src/test/projects/different-proto-out/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'application'
35
id 'org.jetbrains.kotlin.jvm'
@@ -9,3 +11,14 @@ wire {
911
out 'custom'
1012
}
1113
}
14+
15+
tasks.withType(JavaCompile).configureEach {
16+
sourceCompatibility = JavaVersion.VERSION_11.toString()
17+
targetCompatibility = JavaVersion.VERSION_11.toString()
18+
}
19+
20+
tasks.withType(KotlinCompile).configureEach {
21+
kotlinOptions {
22+
jvmTarget = "11"
23+
}
24+
}

wire-gradle-plugin/src/test/projects/java-project-kotlin-protos/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'application'
35
id 'org.jetbrains.kotlin.jvm'
@@ -23,3 +25,13 @@ wire {
2325
}
2426
}
2527

28+
tasks.withType(JavaCompile).configureEach {
29+
sourceCompatibility = JavaVersion.VERSION_11.toString()
30+
targetCompatibility = JavaVersion.VERSION_11.toString()
31+
}
32+
33+
tasks.withType(KotlinCompile).configureEach {
34+
kotlinOptions {
35+
jvmTarget = "11"
36+
}
37+
}

wire-gradle-plugin/src/test/projects/kotlin-enum-mode/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'application'
35
id 'org.jetbrains.kotlin.jvm'
@@ -14,3 +16,14 @@ wire {
1416
enumMode = "sealed_class"
1517
}
1618
}
19+
20+
tasks.withType(JavaCompile).configureEach {
21+
sourceCompatibility = JavaVersion.VERSION_11.toString()
22+
targetCompatibility = JavaVersion.VERSION_11.toString()
23+
}
24+
25+
tasks.withType(KotlinCompile).configureEach {
26+
kotlinOptions {
27+
jvmTarget = "11"
28+
}
29+
}

wire-gradle-plugin/src/test/projects/kotlin-multiplatform/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'org.jetbrains.kotlin.multiplatform'
35
id 'com.squareup.wire'
@@ -25,3 +27,13 @@ wire {
2527
}
2628
}
2729

30+
tasks.withType(JavaCompile).configureEach {
31+
sourceCompatibility = JavaVersion.VERSION_11.toString()
32+
targetCompatibility = JavaVersion.VERSION_11.toString()
33+
}
34+
35+
tasks.withType(KotlinCompile).configureEach {
36+
kotlinOptions {
37+
jvmTarget = "11"
38+
}
39+
}

wire-gradle-plugin/src/test/projects/kotlin-project-java-protos/build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'application'
35
id 'org.jetbrains.kotlin.jvm'
@@ -22,4 +24,15 @@ dependencies {
2224
wire{
2325
java{
2426
}
25-
}
27+
}
28+
29+
tasks.withType(JavaCompile).configureEach {
30+
sourceCompatibility = JavaVersion.VERSION_11.toString()
31+
targetCompatibility = JavaVersion.VERSION_11.toString()
32+
}
33+
34+
tasks.withType(KotlinCompile).configureEach {
35+
kotlinOptions {
36+
jvmTarget = "11"
37+
}
38+
}

wire-gradle-plugin/src/test/projects/kotlin-project-kotlin-protos/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'application'
35
id 'org.jetbrains.kotlin.jvm'
@@ -20,3 +22,14 @@ dependencies {
2022
wire {
2123
kotlin {}
2224
}
25+
26+
tasks.withType(JavaCompile).configureEach {
27+
sourceCompatibility = JavaVersion.VERSION_11.toString()
28+
targetCompatibility = JavaVersion.VERSION_11.toString()
29+
}
30+
31+
tasks.withType(KotlinCompile).configureEach {
32+
kotlinOptions {
33+
jvmTarget = "11"
34+
}
35+
}

wire-gradle-plugin/src/test/projects/move-message/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'application'
35
id 'org.jetbrains.kotlin.jvm'
@@ -12,3 +14,14 @@ wire {
1214

1315
proto {}
1416
}
17+
18+
tasks.withType(JavaCompile).configureEach {
19+
sourceCompatibility = JavaVersion.VERSION_11.toString()
20+
targetCompatibility = JavaVersion.VERSION_11.toString()
21+
}
22+
23+
tasks.withType(KotlinCompile).configureEach {
24+
kotlinOptions {
25+
jvmTarget = "11"
26+
}
27+
}

wire-gradle-plugin/src/test/projects/opaque-message/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
id 'application'
35
id 'org.jetbrains.kotlin.jvm'
@@ -9,3 +11,14 @@ wire {
911

1012
proto {}
1113
}
14+
15+
tasks.withType(JavaCompile).configureEach {
16+
sourceCompatibility = JavaVersion.VERSION_11.toString()
17+
targetCompatibility = JavaVersion.VERSION_11.toString()
18+
}
19+
20+
tasks.withType(KotlinCompile).configureEach {
21+
kotlinOptions {
22+
jvmTarget = "11"
23+
}
24+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
3+
plugins {
4+
id 'com.squareup.wire' apply false
5+
id 'org.jetbrains.kotlin.jvm' apply false
6+
}
7+
18
allprojects {
29
repositories {
310
maven {
411
url "file://${project.rootProject.projectDir}/../../../../../build/localMaven"
512
}
613
mavenCentral()
714
}
15+
16+
tasks.withType(JavaCompile).configureEach {
17+
sourceCompatibility = JavaVersion.VERSION_11.toString()
18+
targetCompatibility = JavaVersion.VERSION_11.toString()
19+
}
20+
21+
tasks.withType(KotlinCompile).configureEach {
22+
kotlinOptions {
23+
jvmTarget = "11"
24+
}
25+
}
826
}

0 commit comments

Comments
 (0)