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.0 #74

Merged
merged 4 commits into from
Aug 12, 2023
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 build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ allprojects {
}

subprojects {
fun CommonExtension<*, *, *, *>.applyAndroid() {
fun CommonExtension<*, *, *, *, *>.applyAndroid() {
lint {
textReport = true
textOutput = file("stdout")
Expand Down
4 changes: 0 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
org.gradle.parallel=true

# Kotlin
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCompatibilityMetadataVariant=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
kotlin.native.ignoreIncorrectDependencies=true

# Android
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[versions]
kotlin = "1.8.22"
kotlin = "1.9.0"
kotlinx-serialization = "1.5.1"
benchmark = "0.4.8"
benchmark = "0.4.9"

[libraries]
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-allopen = { module = "org.jetbrains.kotlin:kotlin-allopen", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test" }
kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
android-gradle-plugin = { module = "com.android.tools.build:gradle", version = "8.0.2" }
android-gradle-plugin = { module = "com.android.tools.build:gradle", version = "8.1.0" }
androidx-test-runner = { module = "androidx.test:runner", version = "1.5.2" }
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.8.20" }
mavenPublish-gradle-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.25.3" }
Expand Down
7 changes: 4 additions & 3 deletions id/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinMultiplatform
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import org.gradle.api.internal.lambdas.SerializableLambdas.action
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

plugins {
Expand All @@ -12,18 +13,18 @@ plugins {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
jvm()
js(IR) {
browser()
nodejs {
testTask {
testTask(action {
useMocha {
timeout = "30s"
}
}
})
}
}

Expand Down
5 changes: 4 additions & 1 deletion id/src/nativeMain/kotlin/diglol/id/native.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package diglol.id

import diglol.crypto.random.nextInt
import kotlin.native.concurrent.AtomicInt
import kotlin.concurrent.AtomicInt
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.UnsafeNumber
import kotlinx.cinterop.alloc
import kotlinx.cinterop.convert
import kotlinx.cinterop.memScoped
Expand All @@ -13,6 +15,7 @@ import platform.posix.timespec

private val nextCounter = AtomicInt(nextInt(Int.MAX_VALUE))

@OptIn(ExperimentalForeignApi::class, UnsafeNumber::class)
internal actual fun epochSeconds(): Long {
memScoped {
val current = alloc<timespec>()
Expand Down
Loading