Skip to content

Commit a651c05

Browse files
committed
build: fix issue with gradle java and kotlin target versions
1 parent f4c0eaf commit a651c05

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ sourceSets.main {
8080
}
8181

8282
java {
83+
sourceCompatibility = kotlin.compilerOptions.jvmTarget.map { JavaVersion.toVersion(it.target) }.get()
84+
targetCompatibility = sourceCompatibility
85+
8386
withSourcesJar()
8487
withJavadocJar()
8588
}

native/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ kotlin {
100100
}
101101

102102
java {
103+
sourceCompatibility = kotlin.compilerOptions.jvmTarget.map { JavaVersion.toVersion(it.target) }.get()
104+
targetCompatibility = sourceCompatibility
105+
103106
withSourcesJar()
104107
withJavadocJar()
105108
}

0 commit comments

Comments
 (0)