Skip to content

misc: add -Xjdk-release=1.8 everywhere we set jvmTarget #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changes/91619ed5-0056-4f22-8863-8dd35b7a3c21.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "91619ed5-0056-4f22-8863-8dd35b7a3c21",
"type": "bugfix",
"description": "Enable building this project on JDK21 by setting -Xjdk-release flag",
"issues": [
"https://github.com/smithy-lang/smithy-kotlin/issues/1295"
]
}
1 change: 1 addition & 0 deletions aws-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.add("-Xjdk-release=1.8")
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
Expand Down
1 change: 1 addition & 0 deletions codegen/aws-sdk-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ val generateSdkRuntimeVersion by tasks.registering {
tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
freeCompilerArgs.add("-Xjdk-release=17")
}
dependsOn(generateSdkRuntimeVersion)
}
Expand Down
1 change: 1 addition & 0 deletions dokka-aws/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tasks.withType<Test>().configureEach {
tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.add("-Xjdk-release=1.8")
allWarningsAsErrors.set(false) // FIXME Dokka bundles stdlib into the classpath, causing an unfixable warning
}
}
Expand Down
1 change: 1 addition & 0 deletions hll/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.add("-Xjdk-release=1.8")
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
Expand Down
1 change: 1 addition & 0 deletions services/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ subprojects {
compilerOptions {
allWarningsAsErrors.set(false) // FIXME Tons of errors occur in generated code
jvmTarget.set(JvmTarget.JVM_1_8) // fixes outgoing variant metadata: https://github.com/smithy-lang/smithy-kotlin/issues/258
freeCompilerArgs.add("-Xjdk-release=1.8")
}
}

Expand Down
Loading