79 lines
2.4 KiB
Plaintext
79 lines
2.4 KiB
Plaintext
|
val ktor_version: String by project
|
||
|
val kotlin_version: String by project
|
||
|
|
||
|
plugins {
|
||
|
kotlin("multiplatform") version "1.7.10"
|
||
|
kotlin("plugin.serialization") version "1.7.10"
|
||
|
`maven-publish`
|
||
|
|
||
|
}
|
||
|
|
||
|
group = "net.sergeych"
|
||
|
version = "0.0.1-SNAPSHOT"
|
||
|
|
||
|
repositories {
|
||
|
maven("https://maven.universablockchain.com")
|
||
|
mavenCentral()
|
||
|
mavenLocal()
|
||
|
}
|
||
|
|
||
|
kotlin {
|
||
|
jvm {
|
||
|
compilations.all {
|
||
|
kotlinOptions.jvmTarget = "1.8"
|
||
|
}
|
||
|
withJava()
|
||
|
testRuns["test"].executionTask.configure {
|
||
|
useJUnitPlatform()
|
||
|
}
|
||
|
}
|
||
|
js(IR) {
|
||
|
browser {
|
||
|
commonWebpackConfig {
|
||
|
cssSupport.enabled = true
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
// val hostOs = System.getProperty("os.name")
|
||
|
// val isMingwX64 = hostOs.startsWith("Windows")
|
||
|
// val nativeTarget = when {
|
||
|
// hostOs == "Mac OS X" -> macosX64("native")
|
||
|
// hostOs == "Linux" -> linuxX64("native")
|
||
|
// isMingwX64 -> mingwX64("native")
|
||
|
// else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
|
||
|
// }
|
||
|
|
||
|
|
||
|
sourceSets {
|
||
|
val commonMain by getting {
|
||
|
dependencies {
|
||
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
|
||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3")
|
||
|
// implementation("org.jetbrains.kotlin:atomicfu:1.6.21")
|
||
|
implementation("io.ktor:ktor-client-core:$ktor_version")
|
||
|
implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
|
||
|
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
|
||
|
api("net.sergeych:unikrypto:1.1.1-SNAPSHOT")
|
||
|
api("org.jetbrains.kotlinx:kotlinx-datetime:0.3.2")
|
||
|
api("net.sergeych:mp_stools:1.2.3-SNAPSHOT")
|
||
|
api("net.sergeych:boss-serialization-mp:0.1.2-SNAPSHOT")
|
||
|
}
|
||
|
}
|
||
|
val commonTest by getting {
|
||
|
dependencies {
|
||
|
implementation(kotlin("test"))
|
||
|
}
|
||
|
}
|
||
|
val jvmMain by getting {
|
||
|
dependencies {
|
||
|
implementation("io.ktor:ktor-client-cio:$ktor_version")
|
||
|
}
|
||
|
}
|
||
|
val jvmTest by getting
|
||
|
val jsMain by getting
|
||
|
val jsTest by getting
|
||
|
// val nativeMain by getting
|
||
|
// val nativeTest by getting
|
||
|
}
|
||
|
}
|