Skip to content

Bump Kotlin to 2.1.20 #3

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

Closed
wants to merge 6 commits into from
Closed
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
45 changes: 32 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import io.github.petertrr.configurePublishing
import io.github.petertrr.ext.booleanProperty
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest

plugins {
Expand All @@ -26,8 +22,8 @@ kotlin {
explicitApi()

compilerOptions {
apiVersion = KotlinVersion.KOTLIN_1_9
languageVersion = KotlinVersion.KOTLIN_1_9
apiVersion = KotlinVersion.KOTLIN_2_1
languageVersion = KotlinVersion.KOTLIN_2_1
}

jvm {
Expand Down Expand Up @@ -81,11 +77,36 @@ kotlin {
nodejs()
}

// Tier 1
macosX64()
macosArm64()
iosSimulatorArm64()
iosX64()
iosArm64()

// Tier 2
linuxX64()
linuxArm64()
watchosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()
tvosSimulatorArm64()
tvosX64()
tvosArm64()

// Tier 3
mingwX64()
macosX64()
macosArm64()
androidNativeArm32()
androidNativeArm64()
androidNativeX86()
androidNativeX64()
watchosDeviceArm64()

// Deprecated.
// Should follow the same route as official Kotlin libraries
@Suppress("DEPRECATION")
linuxArm32Hfp()

sourceSets {
commonTest {
Expand All @@ -105,9 +126,7 @@ detekt {
}

tasks {
withType<Detekt> {
named("check") {
dependsOn(this@withType)
}
check {
dependsOn(detekt)
}
}
23 changes: 15 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
kotlin.code.style=official
# https://kotlinlang.org/docs/whatsnew19.html#try-the-k2-compiler-in-your-project
kotlin.experimental.tryK2=false
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.caching=true
# https://kotlinlang.org/docs/whatsnew19.html#preview-of-gradle-configuration-cache
org.gradle.configuration-cache=false
org.gradle.parallel=true
#########################
# Gradle settings
#########################
org.gradle.jvmargs = -Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel = true
org.gradle.caching = true
org.gradle.configuration-cache = true

#########################
# Kotlin settings
#########################
kotlin.code.style = official

# Kotlin/Native
kotlin.native.enableKlibsCrossCompilation = true
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
kotlin = "1.9.24"
kotlin = "2.1.20-Beta1"
detekt = "1.23.5"
dokka = "1.9.20"
nexus = "1.3.0"
Expand Down
Loading