2023-03-21 05:34:46 +03:00
|
|
|
plugins {
|
2023-03-21 07:27:24 +03:00
|
|
|
kotlin("multiplatform") version "1.7.21"
|
2023-03-21 06:09:20 +03:00
|
|
|
`maven-publish`
|
2023-03-21 05:34:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "net.sergeych"
|
2023-04-21 17:09:20 +03:00
|
|
|
version = "0.0.8-SNAPSHOT"
|
2023-03-21 05:34:46 +03:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2023-03-21 07:27:24 +03:00
|
|
|
mavenLocal()
|
2023-03-21 05:34:46 +03:00
|
|
|
maven("https://maven.universablockchain.com")
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
jvm {
|
|
|
|
jvmToolchain(8)
|
|
|
|
withJava()
|
|
|
|
testRuns["test"].executionTask.configure {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
js(IR) {
|
|
|
|
browser {
|
|
|
|
commonWebpackConfig {
|
|
|
|
// cssSupport {
|
|
|
|
// enabled.set(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 {
|
2023-04-06 17:31:48 +03:00
|
|
|
// implementation("dev.gitlive:kotlin-diff-utils:4.1.4")
|
2023-03-21 05:34:46 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val commonTest by getting {
|
|
|
|
dependencies {
|
2023-04-06 17:31:48 +03:00
|
|
|
implementation("net.sergeych:mp_stools:[1.3.4,)")
|
2023-03-21 05:34:46 +03:00
|
|
|
implementation(kotlin("test"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val jvmMain by getting
|
|
|
|
val jvmTest by getting
|
|
|
|
val jsMain by getting
|
|
|
|
val jsTest by getting
|
|
|
|
val nativeMain by getting
|
|
|
|
val nativeTest by getting
|
|
|
|
}
|
2023-03-21 06:09:20 +03:00
|
|
|
|
|
|
|
publishing {
|
|
|
|
val mavenToken by lazy {
|
|
|
|
File("${System.getProperty("user.home")}/.gitea_token").readText()
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
credentials(HttpHeaderCredentials::class) {
|
|
|
|
name = "Authorization"
|
|
|
|
value = mavenToken
|
|
|
|
}
|
2023-03-21 15:58:03 +03:00
|
|
|
url = uri("https://gitea.sergeych.net/api/packages/SergeychWorks/maven")
|
2023-03-21 06:09:20 +03:00
|
|
|
authentication {
|
|
|
|
create("Authorization", HttpHeaderAuthentication::class)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-21 05:34:46 +03:00
|
|
|
}
|