126 lines
2.9 KiB
Groovy
126 lines
2.9 KiB
Groovy
plugins {
|
|
id "org.jetbrains.kotlin.multiplatform"
|
|
id "maven-publish"
|
|
}
|
|
|
|
|
|
group = "net.codinux.utils"
|
|
|
|
|
|
kotlin {
|
|
// Enable the default target hierarchy:
|
|
targetHierarchy.default()
|
|
|
|
jvm {
|
|
jvmToolchain(8)
|
|
withJava() // not allowed if android { } is present
|
|
|
|
testRuns["test"].executionTask.configure {
|
|
useJUnitPlatform()
|
|
|
|
testLogging { // This is for logging and can be removed.
|
|
events("passed", "skipped", "failed")
|
|
}
|
|
}
|
|
}
|
|
|
|
js(IR) {
|
|
// binaries.executable()
|
|
|
|
browser {
|
|
testTask {
|
|
useKarma {
|
|
useChromeHeadless()
|
|
useFirefoxHeadless()
|
|
}
|
|
}
|
|
}
|
|
|
|
nodejs()
|
|
}
|
|
|
|
|
|
linuxX64()
|
|
mingwX64()
|
|
|
|
|
|
ios {
|
|
binaries {
|
|
framework {
|
|
baseName = "MultiplatformUtils"
|
|
}
|
|
}
|
|
}
|
|
iosSimulatorArm64()
|
|
macosX64()
|
|
macosArm64()
|
|
watchos()
|
|
watchosSimulatorArm64()
|
|
tvos()
|
|
tvosSimulatorArm64()
|
|
|
|
|
|
sourceSets {
|
|
commonMain {
|
|
dependencies {
|
|
api "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinxDateTimeVersion"
|
|
}
|
|
}
|
|
|
|
commonTest {
|
|
dependencies {
|
|
implementation kotlin("test")
|
|
}
|
|
}
|
|
|
|
|
|
jvmMain {
|
|
dependencies {
|
|
// TODO: why does for kotlinx-datetime also the platform specific dependency has to be imported?
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime-jvm:$kotlinxDateTimeVersion")
|
|
|
|
compileOnly "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
compileOnly "com.fasterxml.jackson.core:jackson-databind:2.9.9"
|
|
}
|
|
}
|
|
|
|
jvmTest {
|
|
dependencies {
|
|
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
|
|
}
|
|
|
|
}
|
|
|
|
|
|
jsMain {
|
|
dependencies {
|
|
// TODO: why does for kotlinx-datetime also the platform specific dependency has to be imported?
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime-js:$kotlinxDateTimeVersion")
|
|
implementation npm("@js-joda/timezone", "2.3.0")
|
|
}
|
|
}
|
|
|
|
|
|
linuxX64Main {
|
|
dependencies {
|
|
// TODO: why does for kotlinx-datetime also the platform specific dependency has to be imported?
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime-linuxx64:$kotlinxDateTimeVersion")
|
|
}
|
|
}
|
|
|
|
mingwX64Main {
|
|
dependencies {
|
|
// TODO: why does for kotlinx-datetime also the platform specific dependency has to be imported?
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime-mingwx64:$kotlinxDateTimeVersion")
|
|
}
|
|
}
|
|
|
|
appleMain {
|
|
dependencies {
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
} |