started migration to ktor sockets (e.g. tcp on all platforms but JS)
This commit is contained in:
1 parent
326b92142d
commit
26d1f3522f
4 files changed
+175
-108
No files matched your search
+10
-25
@@ -6,7 +6,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "net.sergeych"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -21,19 +21,6 @@ kotlin {
|
||||
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.")
|
||||
// }
|
||||
|
||||
macosArm64()
|
||||
iosX64()
|
||||
iosArm64()
|
||||
@@ -55,18 +42,16 @@ kotlin {
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")
|
||||
|
||||
// api("com.ionspin.kotlin:bignum:0.3.9")
|
||||
api("io.ktor:ktor-client-core:$ktor_version")
|
||||
api("net.sergeych:crypto2:0.4.2")
|
||||
}
|
||||
}
|
||||
// val ktorSocketMain by creating {
|
||||
// dependsOn(commonMain)
|
||||
// dependencies {
|
||||
// implementation("io.ktor:ktor-network:$ktor_version")
|
||||
// }
|
||||
// }
|
||||
val ktorSocketMain by creating {
|
||||
dependsOn(commonMain)
|
||||
dependencies {
|
||||
implementation("io.ktor:ktor-network:$ktor_version")
|
||||
}
|
||||
}
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
@@ -82,7 +67,7 @@ kotlin {
|
||||
implementation("io.ktor:ktor-server-netty:$ktor_version")
|
||||
api("io.ktor:ktor-client-cio:$ktor_version")
|
||||
}
|
||||
// dependsOn(ktorSocketMain)
|
||||
dependsOn(ktorSocketMain)
|
||||
}
|
||||
val jvmTest by getting
|
||||
val jsMain by getting {
|
||||
@@ -92,8 +77,8 @@ kotlin {
|
||||
}
|
||||
val jsTest by getting
|
||||
|
||||
// for (pm in listOf(linuxMain, macosMain, iosMain, mingwMain))
|
||||
// pm { dependsOn(ktorSocketMain) }
|
||||
for (pm in listOf(linuxMain, macosMain, iosMain, mingwMain))
|
||||
pm { dependsOn(ktorSocketMain) }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user