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

Update Kotlin to 1.9.21 #380

Merged
merged 9 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 8 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
15 changes: 10 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.gradle.jvm.tasks.Jar
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.jvm.tasks.Jar
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
kotlin("multiplatform") version "1.8.22"
kotlin("multiplatform") version "1.9.21"
id("org.jetbrains.dokka") version "1.8.20"
`maven-publish`
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
Expand Down Expand Up @@ -40,17 +41,21 @@ apply(plugin = "io.github.gradle-nexus.publish-plugin")

kotlin {
explicitApi()

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}

jvm {
compilations.all {
// kotlin compiler compatibility options
kotlinOptions {
apiVersion = "1.4"
Copy link
Owner

Choose a reason for hiding this comment

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

removing that means only kotlin >= 1.9 is supported, right? if it's possible to keep it explicit it's better.

But a bigger concern is that this forces all users to upgrade to kotlin 1.9, which is not that practical (yet).
If all my assumptions here are correct the best way to move forward is to merge this and create a new major version for the lib, with support for previous version for some time.

Copy link
Contributor Author

@AzimMuradov AzimMuradov Dec 18, 2023

Choose a reason for hiding this comment

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

removing that means only kotlin >= 1.9 is supported, right? if it's possible to keep it explicit it's better.

But a bigger concern is that this forces all users to upgrade to kotlin 1.9, which is not that practical (yet).

Sadly, I can't figure out a way with lower api and language versions, but I can set them explicitly.

If all my assumptions here are correct the best way to move forward is to merge this and create a new major version for the lib, with support for previous version for some time.

Agreed, the best way to handle this is to create a new major version and keep support for the previous one for some time.

languageVersion = "1.4"
jvmTarget = "1.8"
}
}
}
js(BOTH) {
js {
browser {
testTask {
useKarma {
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
org.gradle.jvmargs=-Xmx2048m
# see https://kotlinlang.org/docs/whatsnew18.html#sourcedirectories
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.applyDefaultHierarchyTemplate=false
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:OptIn(ExperimentalForeignApi::class)

package io.github.oshai.kotlinlogging

import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.ptr
import platform.darwin.OS_LOG_TYPE_DEBUG
import platform.darwin.OS_LOG_TYPE_DEFAULT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.oshai.kotlinlogging

import kotlin.native.concurrent.AtomicReference
import kotlin.concurrent.AtomicReference

public object KotlinLoggingConfiguration {
public var subsystem: AtomicReference<String?> = AtomicReference(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io.github.oshai.kotlinlogging.internal
import io.github.oshai.kotlinlogging.DarwinKLogger
import io.github.oshai.kotlinlogging.KLogger
import io.github.oshai.kotlinlogging.KotlinLoggingConfiguration
import kotlin.native.concurrent.AtomicReference
import kotlin.concurrent.AtomicReference
import platform.darwin.OS_LOG_DEFAULT
import platform.darwin.os_log_create

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:OptIn(ExperimentalForeignApi::class)

package io.github.oshai.kotlinlogging

import kotlinx.cinterop.ExperimentalForeignApi
import platform.posix.fprintf
import platform.posix.stderr

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.oshai.kotlinlogging

import kotlin.native.concurrent.AtomicReference
import kotlin.concurrent.AtomicReference

public expect val DefaultAppender: Appender

Expand Down
Loading