Unverified Commit 952b7d89 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

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._
parent e7e2419f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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")
+5 −0
Original line number Diff line number Diff line
@@ -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)
+5 −0
Original line number Diff line number Diff line
@@ -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"
}
+5 −0
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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"
}
Loading