From 22bbf70b025416e58b6bf520e35ba41e4c6fe482 Mon Sep 17 00:00:00 2001 From: "R. C. Howell" Date: Thu, 8 Jun 2023 10:03:18 -0700 Subject: [PATCH] Updates to kotlin 1.6; compile target remains 1.4 (#1117) --- CHANGELOG.md | 1 + buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/kotlin/partiql.conventions.gradle.kts | 2 +- buildSrc/src/main/kotlin/partiql.versions.kt | 2 +- examples/build.gradle.kts | 3 +-- partiql-cli/build.gradle.kts | 3 +-- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c4aef4972..29f6e8535b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Updates Kotlin from 1.5.+ to 1.6; compile target remains 1.4 - Moves PartiqlAst, PartiqlLogical, PartiqlLogicalResolved, and PartiqlPhysical (along with the transforms) to a new project, `partiql-ast`. These are still imported into `partiql-lang` with the `api` annotation. Therefore, no action is required to consume the migrated classes. However, this now gives consumers of the AST, Experimental Plans, diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 46c51af2c5..48c6cbf7dd 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -25,7 +25,7 @@ repositories { object Versions { const val detekt = "1.20.0-RC1" const val dokka = "1.6.10" - const val kotlin = "1.5.+" + const val kotlin = "1.6.20" const val ktlint = "10.2.1" const val pig = "0.6.1" } diff --git a/buildSrc/src/main/kotlin/partiql.conventions.gradle.kts b/buildSrc/src/main/kotlin/partiql.conventions.gradle.kts index 88b18e7b60..e660d736d7 100644 --- a/buildSrc/src/main/kotlin/partiql.conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/partiql.conventions.gradle.kts @@ -49,7 +49,7 @@ java { tasks.test { useJUnitPlatform() // Enable JUnit5 - jvmArgs!!.addAll(listOf("-Duser.language=en", "-Duser.country=US")) + jvmArgs.addAll(listOf("-Duser.language=en", "-Duser.country=US")) maxHeapSize = "4g" testLogging { events.add(TestLogEvent.FAILED) diff --git a/buildSrc/src/main/kotlin/partiql.versions.kt b/buildSrc/src/main/kotlin/partiql.versions.kt index 48184e5546..cd41a72e4f 100644 --- a/buildSrc/src/main/kotlin/partiql.versions.kt +++ b/buildSrc/src/main/kotlin/partiql.versions.kt @@ -18,7 +18,7 @@ object Versions { // Language - const val kotlin = "1.5.31" + const val kotlin = "1.6.20" const val kotlinTarget = "1.4" const val javaTarget = "1.8" diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 4e12787c60..765216f042 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -28,9 +28,8 @@ dependencies { implementation(Deps.awsSdkS3) } -// TODO: Once we upgrade kotlin version to 1.6+, we need to change the compile option to -opt-in // Version 1.7+ removes the requirement for such compiler option. tasks.withType().configureEach { kotlinOptions - .freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" + .freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } diff --git a/partiql-cli/build.gradle.kts b/partiql-cli/build.gradle.kts index d1973cd392..739fcc4cf5 100644 --- a/partiql-cli/build.gradle.kts +++ b/partiql-cli/build.gradle.kts @@ -60,9 +60,8 @@ tasks.register("install") { tasks = listOf("assembleDist", "distZip", "installDist") } -// TODO: Once we upgrade kotlin version to 1.6+, we need to change the compile option to -opt-in // Version 1.7+ removes the requirement for such compiler option. tasks.withType().configureEach { kotlinOptions - .freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" + .freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" }