initial commit
This commit is contained in:
commit
aaa8c436b0
18 files changed
+551
No files matched your search
@@ -0,0 +1,89 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.9.20"
|
||||
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.20"
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
group = "net.sergeych"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://maven.universablockchain.com/")
|
||||
maven("https://gitea.sergeych.net/api/packages/SergeychWorks/maven")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
jvmToolchain(8)
|
||||
withJava()
|
||||
testRuns.named("test") {
|
||||
executionTask.configure {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
}
|
||||
js(KotlinJsCompilerType.IR) {
|
||||
browser {
|
||||
}
|
||||
}
|
||||
val hostOs = System.getProperty("os.name")
|
||||
val isArm64 = System.getProperty("os.arch") == "aarch64"
|
||||
val isMingwX64 = hostOs.startsWith("Windows")
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val nativeTarget = when {
|
||||
hostOs == "Mac OS X" && isArm64 -> macosArm64("native")
|
||||
hostOs == "Mac OS X" && !isArm64 -> macosX64("native")
|
||||
hostOs == "Linux" && isArm64 -> linuxArm64("native")
|
||||
hostOs == "Linux" && !isArm64 -> linuxX64("native")
|
||||
isMingwX64 -> mingwX64("native")
|
||||
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
|
||||
}
|
||||
|
||||
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.7.3")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
|
||||
|
||||
implementation("com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.9.0")
|
||||
api("com.ionspin.kotlin:bignum:0.3.8")
|
||||
|
||||
api("net.sergeych:mp_bintools:0.0.6")
|
||||
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 jvmMain by getting {
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
val jvmTest by getting
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
val jsTest by getting
|
||||
val nativeMain by getting {
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
val nativeTest by getting
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user