diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce408284..1c9482ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index ae1df0c8..c3e08646 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -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 diff --git a/build.gradle.kts b/build.gradle.kts index 9eba497c..44b7ac30 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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` } @@ -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 { @@ -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")) } @@ -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) { diff --git a/src/commonMain/kotlin/fr/acinq/bitcoin/crypto/Pbkdf2.kt b/src/commonMain/kotlin/fr/acinq/bitcoin/crypto/Pbkdf2.kt index 79500e8a..7453128f 100644 --- a/src/commonMain/kotlin/fr/acinq/bitcoin/crypto/Pbkdf2.kt +++ b/src/commonMain/kotlin/fr/acinq/bitcoin/crypto/Pbkdf2.kt @@ -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 }