Skip to content

Commit

Permalink
Use kotlin 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
sstone committed Dec 13, 2023
1 parent 97ddba8 commit f3888e7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Publish Linux
if: matrix.os == 'ubuntu-latest'
shell: bash
run: ./gradlew publishLinuxPublicationToMavenLocal
run: ./gradlew publishLinuxX64PublicationToMavenLocal
- name: Publish MacOS
if: matrix.os == 'macOS-latest'
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Publish Linux to Maven Local
if: matrix.os == 'ubuntu-latest'
shell: bash
run: ./gradlew publishLinuxPublicationToMavenLocal
run: ./gradlew publishLinuxX64PublicationToMavenLocal
- name: Publish MacOS to Maven Local
if: matrix.os == 'macOS-latest'
shell: bash
Expand Down
26 changes: 20 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeHostTest
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest

plugins {
kotlin("multiplatform") version "1.8.21"
id("org.jetbrains.dokka") version "1.8.10"
kotlin("multiplatform") version "1.9.21"
id("org.jetbrains.dokka") version "1.9.10"
`maven-publish`
}

Expand All @@ -30,14 +30,22 @@ kotlin {
}
}

linuxX64("linux")
linuxX64()

ios {
iosX64 {
compilations["main"].cinterops.create("CoreCrypto")
}

iosArm64 {
compilations["main"].cinterops.create("CoreCrypto")
}

iosSimulatorArm64 {
compilations["main"].cinterops.create("CoreCrypto")
}

sourceSets {
val secp256k1KmpVersion = "0.11.0"
val secp256k1KmpVersion = "0.13.0-SNAPSHOT"

val commonMain by getting {
dependencies {
Expand Down Expand Up @@ -76,12 +84,18 @@ kotlin {
compilations.all {
kotlinOptions {
allWarningsAsErrors = true
// We use expect/actual for classes (see Chacha20Poly1305CipherFunctions). This feature is in beta and raises a warning.
// See https://youtrack.jetbrains.com/issue/KT-61573
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}
}
}
}

configurations.forEach {
// do not cache changing (i.e. SNAPSHOT) dependencies
it.resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)

if (it.name.contains("testCompileClasspath")) {
it.attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, "java-runtime"))
}
Expand All @@ -94,7 +108,7 @@ plugins.withId("org.jetbrains.kotlin.multiplatform") {
val currentOs = org.gradle.internal.os.OperatingSystem.current()
val targets = when {
currentOs.isLinux -> listOf()
else -> listOf("linux")
else -> listOf("linuxX64")
}.mapNotNull { kotlin.targets.findByName(it) as? org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget }

configure(targets) {
Expand Down
1 change: 0 additions & 1 deletion src/commonMain/kotlin/fr/acinq/bitcoin/crypto/Pbkdf2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import kotlin.jvm.JvmStatic

public expect object Pbkdf2 {

@JvmStatic
public fun withHmacSha512(password: ByteArray, salt: ByteArray, count: Int, dkLen: Int): ByteArray

}

0 comments on commit f3888e7

Please sign in to comment.