diff --git a/.gitignore b/.gitignore index 12e4df1..0032979 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ ### Gradle template .gradle build/ - +.kotlin # Ignore Gradle GUI config gradle-app.setting diff --git a/build.gradle.kts b/build.gradle.kts index 9066589..ece107f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("multiplatform") version "1.9.23" + kotlin("multiplatform") version "2.0.0" // This version is dependent on the maximum tested version // of this plugin within the Kotlin multiplatform library id("com.android.library") version "8.3.2" @@ -27,13 +27,14 @@ group = "io.github.oshai" version = "6.0.10" repositories { - gradlePluginPortal() google() mavenCentral() } tasks.withType { - kotlinOptions.jvmTarget = JvmTarget.JVM_1_8.target + compilerOptions { + jvmTarget = JvmTarget.JVM_1_8 + } } kotlin { @@ -42,19 +43,15 @@ kotlin { @OptIn(ExperimentalKotlinGradlePluginApi::class) compilerOptions { // kotlin compiler compatibility options - apiVersion.set(KotlinVersion.KOTLIN_1_9) - languageVersion.set(KotlinVersion.KOTLIN_1_9) + apiVersion.set(KotlinVersion.KOTLIN_2_0) + languageVersion.set(KotlinVersion.KOTLIN_2_0) + // Required to silence compiler warnings about the beta status of + // expected and actual classes. See https://kotlinlang.org/docs/multiplatform-expect-actual.html#expected-and-actual-classes freeCompilerArgs.add("-Xexpect-actual-classes") } jvm { - compilations.all { - // kotlin compiler compatibility options - kotlinOptions { - jvmTarget = "1.8" - } - } } js { browser {