2022-08-25 23:16:22 +03:00
|
|
|
val ktor_version: String by project
|
|
|
|
val kotlin_version: String by project
|
2022-09-07 22:38:21 +03:00
|
|
|
val logback_version: String by project
|
2022-08-25 23:16:22 +03:00
|
|
|
|
|
|
|
plugins {
|
2022-12-10 20:12:42 +03:00
|
|
|
kotlin("multiplatform") version "1.7.21"
|
|
|
|
kotlin("plugin.serialization") version "1.7.21"
|
|
|
|
id("org.jetbrains.dokka") version "1.7.20"
|
2022-08-25 23:16:22 +03:00
|
|
|
`maven-publish`
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "net.sergeych"
|
2023-07-21 13:59:23 +03:00
|
|
|
version = "0.4.4-SNAPSHOT"
|
2022-08-25 23:16:22 +03:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
mavenLocal()
|
2022-09-14 04:12:54 +03:00
|
|
|
maven("https://maven.universablockchain.com")
|
2022-08-25 23:16:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
2022-09-27 16:06:06 +03:00
|
|
|
jvmToolchain {
|
2022-12-10 16:07:10 +03:00
|
|
|
languageVersion.set(JavaLanguageVersion.of("8"))
|
2022-09-27 16:06:06 +03:00
|
|
|
}
|
2023-01-19 18:36:40 +03:00
|
|
|
|
2022-08-25 23:16:22 +03:00
|
|
|
jvm {
|
|
|
|
compilations.all {
|
2022-12-10 16:07:10 +03:00
|
|
|
kotlinOptions.jvmTarget = "1.8"
|
2022-08-25 23:16:22 +03:00
|
|
|
}
|
|
|
|
withJava()
|
|
|
|
testRuns["test"].executionTask.configure {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
js(IR) {
|
|
|
|
browser {
|
|
|
|
commonWebpackConfig {
|
|
|
|
cssSupport.enabled = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sourceSets {
|
2023-01-19 18:36:40 +03:00
|
|
|
all {
|
|
|
|
languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi")
|
|
|
|
languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
|
|
|
|
}
|
2022-08-25 23:16:22 +03:00
|
|
|
val commonMain by getting {
|
|
|
|
dependencies {
|
2022-09-07 11:45:06 +03:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3")
|
|
|
|
implementation("io.ktor:ktor-client-core:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-client-websockets:$ktor_version")
|
2022-12-10 20:12:42 +03:00
|
|
|
|
|
|
|
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
|
|
|
|
|
2022-09-07 11:45:06 +03:00
|
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
|
2023-07-21 13:59:23 +03:00
|
|
|
api("net.sergeych:boss-serialization-mp:0.2.7-SNAPSHOT")
|
2022-12-10 16:07:10 +03:00
|
|
|
api("net.sergeych:unikrypto:1.2.2-SNAPSHOT")
|
|
|
|
api("net.sergeych:mp_stools:1.3.2-SNAPSHOT")
|
2022-09-07 11:45:06 +03:00
|
|
|
|
2022-08-25 23:16:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val commonTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test"))
|
2022-09-07 11:45:06 +03:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
|
2022-08-25 23:16:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val jvmMain by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation("org.mapdb:mapdb:3.0.8")
|
2022-09-07 22:38:21 +03:00
|
|
|
implementation("io.ktor:ktor-client-cio-jvm:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-websockets:$ktor_version")
|
2022-12-10 16:07:10 +03:00
|
|
|
implementation("io.ktor:ktor-server-websockets-jvm:$ktor_version")
|
2022-09-07 22:38:21 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val jvmTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation("io.ktor:ktor-server-core:$ktor_version")
|
|
|
|
implementation("io.ktor:ktor-server-netty:$ktor_version")
|
|
|
|
implementation("ch.qos.logback:logback-classic:$logback_version")
|
|
|
|
|
2022-08-25 23:16:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val jsMain by getting
|
|
|
|
val jsTest by getting
|
|
|
|
}
|
2022-09-27 16:06:06 +03:00
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url = uri("https://maven.universablockchain.com/")
|
2023-01-19 18:36:40 +03:00
|
|
|
val mavenUser: String by project
|
|
|
|
val mavenPassword: String by project
|
2022-09-27 16:06:06 +03:00
|
|
|
credentials {
|
2023-01-19 18:36:40 +03:00
|
|
|
username = mavenUser // System.getenv("maven_user")
|
|
|
|
password = mavenPassword // System.getenv("maven_password")
|
2022-09-27 16:06:06 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-08-25 23:16:22 +03:00
|
|
|
}
|