119 lines
2.7 KiB
Plaintext
119 lines
2.7 KiB
Plaintext
plugins {
|
|
kotlin("multiplatform") version "1.9.22"
|
|
`maven-publish`
|
|
}
|
|
|
|
group = "net.sergeych"
|
|
version = "0.0.10"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven("https://maven.universablockchain.com")
|
|
}
|
|
|
|
kotlin {
|
|
jvm {
|
|
jvmToolchain(11)
|
|
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.")
|
|
// }
|
|
|
|
wasmJs {
|
|
browser()
|
|
binaries.executable()
|
|
}
|
|
|
|
listOf(
|
|
iosX64(),
|
|
iosArm64(),
|
|
iosSimulatorArm64()
|
|
).forEach {
|
|
it.binaries.framework {
|
|
baseName = "morozilko_lib"
|
|
isStatic = true
|
|
}
|
|
}
|
|
|
|
listOf(
|
|
macosX64(),
|
|
macosArm64()
|
|
).forEach {
|
|
it.binaries.framework {
|
|
baseName = "morozilko_lib"
|
|
isStatic = true
|
|
}
|
|
}
|
|
|
|
linuxX64 {
|
|
binaries.staticLib {
|
|
baseName = "morozilko_lib"
|
|
}
|
|
}
|
|
|
|
|
|
mingwX64 {
|
|
binaries.staticLib {
|
|
baseName = "morozilko_lib"
|
|
}
|
|
}
|
|
|
|
|
|
sourceSets {
|
|
val commonMain by getting {
|
|
dependencies {
|
|
// implementation("net.sergeych:mp_stools:[1.4.7,)")
|
|
}
|
|
}
|
|
val commonTest by getting {
|
|
dependencies {
|
|
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
|
|
}
|
|
|
|
publishing {
|
|
val mavenToken by lazy {
|
|
File("${System.getProperty("user.home")}/.gitea_token").readText()
|
|
}
|
|
repositories {
|
|
maven {
|
|
credentials(HttpHeaderCredentials::class) {
|
|
name = "Authorization"
|
|
value = mavenToken
|
|
}
|
|
url = uri("https://gitea.sergeych.net/api/packages/SergeychWorks/maven")
|
|
authentication {
|
|
create("Authorization", HttpHeaderAuthentication::class)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|