90 lines
2.5 KiB
Plaintext
90 lines
2.5 KiB
Plaintext
plugins {
|
|
kotlin("multiplatform") version "2.0.0"
|
|
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.0"
|
|
`maven-publish`
|
|
}
|
|
|
|
group = "net.sergeych"
|
|
version = "0.2.1-SNAPSHOT"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://maven.universablockchain.com/")
|
|
maven("https://gitea.sergeych.net/api/packages/SergeychWorks/maven")
|
|
mavenLocal()
|
|
}
|
|
|
|
kotlin {
|
|
jvm()
|
|
linuxX64()
|
|
linuxArm64()
|
|
|
|
// macosX64()
|
|
// macosArm64()
|
|
// iosX64()
|
|
// iosArm64()
|
|
// iosSimulatorArm64()
|
|
mingwX64()
|
|
// wasmJs() no libsodimu bindings yet (strangely)
|
|
// val ktor_version = "2.3.6"
|
|
|
|
sourceSets {
|
|
all {
|
|
languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi")
|
|
languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
|
|
languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
|
|
}
|
|
|
|
|
|
val commonMain by getting {
|
|
dependencies {
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.0")
|
|
|
|
implementation("com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.9.0")
|
|
api("com.ionspin.kotlin:bignum:0.3.9")
|
|
|
|
api("net.sergeych:mp_bintools:0.1.5-SNAPSHOT")
|
|
api("net.sergeych:mp_stools:1.4.1")
|
|
}
|
|
}
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test"))
|
|
implementation("org.slf4j:slf4j-simple:2.0.9")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
|
|
}
|
|
}
|
|
val native by creating {
|
|
dependsOn(commonMain)
|
|
dependencies {
|
|
}
|
|
}
|
|
val jvmMain by getting {
|
|
dependencies {
|
|
}
|
|
}
|
|
val jvmTest by getting
|
|
for (platform in listOf(linuxMain, macosMain, iosMain, mingwMain))
|
|
platform { dependsOn(native) }
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
val mavenToken by lazy {
|
|
File("${System.getProperty("user.home")}/.gitea_token").readText()
|
|
}
|
|
repositories {
|
|
maven {
|
|
credentials(HttpHeaderCredentials::class) {
|
|
name = "Authorization"
|
|
value = mavenToken
|
|
}
|
|
url = uri("https://gitea.sergeych.net/api/packages/SergeychWorks/maven")
|
|
authentication {
|
|
create("Authorization", HttpHeaderAuthentication::class)
|
|
}
|
|
}
|
|
}
|
|
}
|