diff --git a/build.gradle.kts b/build.gradle.kts index a3ae01eaf5b..a935f06f849 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ */ plugins { - kotlin("jvm") version "1.5.31" apply false + kotlin("jvm") id("org.jetbrains.dokka") } diff --git a/codegen/smithy-aws-swift-codegen/build.gradle.kts b/codegen/smithy-aws-swift-codegen/build.gradle.kts index a516ce6b159..316573c974e 100644 --- a/codegen/smithy-aws-swift-codegen/build.gradle.kts +++ b/codegen/smithy-aws-swift-codegen/build.gradle.kts @@ -2,6 +2,9 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { kotlin("jvm") jacoco @@ -21,7 +24,7 @@ val junitVersion: String by project val jacocoVersion: String by project dependencies { - implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) api("software.amazon.smithy:smithy-swift-codegen:$smithySwiftVersion") api("software.amazon.smithy:smithy-aws-traits:$smithyVersion") api("software.amazon.smithy:smithy-aws-iam-traits:$smithyVersion") @@ -33,6 +36,17 @@ dependencies { implementation("software.amazon.smithy:smithy-aws-endpoints:$smithyVersion") } +tasks.withType { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } +} + +tasks.withType { + sourceCompatibility = JavaVersion.VERSION_17.toString() + targetCompatibility = JavaVersion.VERSION_17.toString() +} + jacoco { toolVersion = "$jacocoVersion" } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt index d82d63cc70e..e4cc79ee98c 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt @@ -76,7 +76,7 @@ abstract class AWSHttpBindingProtocolGenerator : HttpBindingProtocolGenerator() var testCount = 0 ctx.service.getTrait()?.let { testsTrait -> - if (testsTrait?.testCases.isEmpty()) { + if (testsTrait.testCases?.isEmpty() == true) { return 0 } diff --git a/gradle.properties b/gradle.properties index c5127334936..d2520f8982c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,8 +9,8 @@ smithyGradleVersion=0.6.0 smithySwiftVersion = 0.1.0 # kotlin -kotlinVersion=1.5.31 -dokkaVersion=1.5.31 +kotlinVersion=1.9.24 +dokkaVersion=1.9.20 kotlin.native.ignoreDisabledTargets=true # testing/utility diff --git a/scripts/ci_steps/log_tool_versions.sh b/scripts/ci_steps/log_tool_versions.sh index b26456c1b3b..f23b12822f8 100755 --- a/scripts/ci_steps/log_tool_versions.sh +++ b/scripts/ci_steps/log_tool_versions.sh @@ -55,6 +55,15 @@ else fi echo +if command -v kotlin &> /dev/null +then + which kotlin + kotlin -version +else + echo "kotlin not installed" +fi +echo + if command -v xcbeautify &> /dev/null then which xcbeautify