Skip to content
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

Upgraded Kotlin to 2.0.0 #428

Merged
merged 6 commits into from
Jun 4, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
### Gradle template
.gradle
build/

.kotlin
# Ignore Gradle GUI config
gradle-app.setting

Expand Down
19 changes: 8 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -27,13 +27,14 @@ group = "io.github.oshai"
version = "6.0.10"

repositories {
gradlePluginPortal()
google()
mavenCentral()
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = JvmTarget.JVM_1_8.target
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
}
}

kotlin {
Expand All @@ -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")
Copy link
Owner

@oshai oshai May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still required? -Xexpect-actual-classes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://kotlinlang.org/docs/multiplatform-expect-actual.html#expected-and-actual-classes

Sounds like they still require it in there, but I'll put a link to the docs for reference in the future.

}

jvm {
compilations.all {
// kotlin compiler compatibility options
kotlinOptions {
jvmTarget = "1.8"
}
}
}
js {
browser {
Expand Down
Loading