mirror of https://github.com/smithy-lang/smithy-rs
Fix the build against JDK 20 (#3323)
When using JDK 20, the following error would occur when attempting to build or run tests: ``` Execution failed for task ':codegen-client:compileKotlin'. > Inconsistent JVM-target compatibility detected for tasks 'compileJava' (20) and 'compileKotlin' (11). ``` This PR explicitly sets the Java source and target versions to fix this error. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
This commit is contained in:
parent
e7e2419ff8
commit
952b7d8943
|
@ -12,6 +12,11 @@ group = "software.amazon.aws.rustruntime"
|
|||
|
||||
version = "0.0.3"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
from("./") {
|
||||
include("aws-inlineable/src/*.rs")
|
||||
|
|
|
@ -12,6 +12,11 @@ plugins {
|
|||
id("software.amazon.smithy")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
val smithyVersion: String by project
|
||||
val defaultRustDocFlags: String by project
|
||||
val properties = PropertyRetriever(rootProject, project)
|
||||
|
|
|
@ -30,6 +30,11 @@ dependencies {
|
|||
implementation("software.amazon.smithy:smithy-aws-endpoints:$smithyVersion")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.compileKotlin {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
}
|
||||
|
|
|
@ -18,6 +18,11 @@ plugins {
|
|||
id("software.amazon.smithy")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
configure<software.amazon.smithy.gradle.SmithyExtension> {
|
||||
smithyBuildConfigs = files(layout.buildDirectory.file("smithy-build.json"))
|
||||
allowUnknownTraits = true
|
||||
|
|
|
@ -34,6 +34,11 @@ dependencies {
|
|||
testImplementation("software.amazon.smithy:smithy-validation-model:$smithyVersion")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.compileKotlin {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
}
|
||||
|
|
|
@ -97,6 +97,11 @@ val generateSmithyRuntimeCrateVersion by tasks.registering {
|
|||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.compileKotlin {
|
||||
kotlinOptions.jvmTarget = "11"
|
||||
dependsOn(generateSmithyRuntimeCrateVersion)
|
||||
|
|
|
@ -32,6 +32,11 @@ dependencies {
|
|||
testImplementation("software.amazon.smithy:smithy-validation-model:$smithyVersion")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.compileKotlin { kotlinOptions.jvmTarget = "11" }
|
||||
|
||||
// Reusable license copySpec
|
||||
|
|
|
@ -32,6 +32,11 @@ dependencies {
|
|||
testImplementation("software.amazon.smithy:smithy-validation-model:$smithyVersion")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.compileKotlin { kotlinOptions.jvmTarget = "11" }
|
||||
|
||||
// Reusable license copySpec
|
||||
|
|
|
@ -29,6 +29,11 @@ dependencies {
|
|||
implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.compileKotlin { kotlinOptions.jvmTarget = "11" }
|
||||
|
||||
// Reusable license copySpec
|
||||
|
|
|
@ -13,6 +13,11 @@ group = "software.amazon.rustruntime"
|
|||
|
||||
version = "0.0.3"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
from("./") {
|
||||
include("inlineable/src/")
|
||||
|
|
Loading…
Reference in New Issue