2020-07-11 10:03:28 +00:00
|
|
|
plugins {
|
|
|
|
id "org.jetbrains.kotlin.multiplatform"
|
|
|
|
id "maven-publish"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-02-11 23:26:12 +00:00
|
|
|
group = "net.codinux.utils"
|
2020-07-11 10:03:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
kotlin {
|
2023-07-06 13:43:23 +00:00
|
|
|
// Enable the default target hierarchy:
|
|
|
|
targetHierarchy.default()
|
|
|
|
|
2020-07-11 10:03:28 +00:00
|
|
|
jvm {
|
2023-07-06 13:43:23 +00:00
|
|
|
jvmToolchain(8)
|
|
|
|
withJava() // not allowed if android { } is present
|
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
testRuns["test"].executionTask.configure {
|
|
|
|
useJUnitPlatform()
|
2023-07-06 13:43:23 +00:00
|
|
|
|
|
|
|
testLogging { // This is for logging and can be removed.
|
|
|
|
events("passed", "skipped", "failed")
|
|
|
|
}
|
2020-07-11 10:03:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-15 00:39:17 +00:00
|
|
|
js(IR) {
|
2023-07-06 13:43:23 +00:00
|
|
|
// binaries.executable()
|
|
|
|
|
2022-02-15 00:39:17 +00:00
|
|
|
browser {
|
|
|
|
testTask {
|
|
|
|
useKarma {
|
2023-07-06 13:43:23 +00:00
|
|
|
useChromeHeadless()
|
|
|
|
useFirefoxHeadless()
|
2022-02-15 00:39:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-06 13:43:23 +00:00
|
|
|
|
|
|
|
nodejs()
|
2022-02-15 00:39:17 +00:00
|
|
|
}
|
2022-02-11 22:53:35 +00:00
|
|
|
|
2023-07-06 13:43:23 +00:00
|
|
|
|
|
|
|
linuxX64()
|
|
|
|
mingwX64()
|
|
|
|
|
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
ios {
|
|
|
|
binaries {
|
|
|
|
framework {
|
|
|
|
baseName = "MultiplatformUtils"
|
2020-07-11 10:03:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-06 13:43:23 +00:00
|
|
|
iosSimulatorArm64()
|
|
|
|
macosX64()
|
|
|
|
macosArm64()
|
|
|
|
watchos()
|
|
|
|
watchosSimulatorArm64()
|
|
|
|
tvos()
|
|
|
|
tvosSimulatorArm64()
|
2022-02-11 22:53:35 +00:00
|
|
|
|
2020-07-11 10:03:28 +00:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
commonMain {
|
|
|
|
dependencies {
|
2023-07-06 11:49:55 +00:00
|
|
|
api "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinxDateTimeVersion"
|
2020-07-11 10:03:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
commonTest {
|
|
|
|
dependencies {
|
|
|
|
implementation kotlin("test-common")
|
|
|
|
implementation kotlin("test-annotations-common")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
jvmMain {
|
|
|
|
dependencies {
|
2023-07-06 11:49:55 +00:00
|
|
|
// TODO: why does for kotlinx-datetime also the platform specific dependency has to be imported?
|
|
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime-jvm:$kotlinxDateTimeVersion")
|
2020-07-11 10:03:28 +00:00
|
|
|
|
|
|
|
compileOnly "org.slf4j:slf4j-api:$slf4jVersion"
|
2020-07-20 11:53:31 +00:00
|
|
|
|
|
|
|
compileOnly "com.fasterxml.jackson.core:jackson-databind:2.9.9"
|
2020-07-11 10:03:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jvmTest {
|
|
|
|
dependencies {
|
|
|
|
implementation kotlin("test-junit")
|
|
|
|
|
|
|
|
implementation "org.junit.jupiter:junit-jupiter:$junit5Version"
|
|
|
|
runtimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version"
|
|
|
|
|
|
|
|
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-02-15 00:39:17 +00:00
|
|
|
jsMain {
|
|
|
|
dependencies {
|
2023-07-06 11:49:55 +00:00
|
|
|
// TODO: why does for kotlinx-datetime also the platform specific dependency has to be imported?
|
|
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime-js:$kotlinxDateTimeVersion")
|
2022-02-15 00:39:17 +00:00
|
|
|
implementation npm("@js-joda/timezone", "2.3.0")
|
|
|
|
}
|
|
|
|
}
|
2022-02-12 15:31:46 +00:00
|
|
|
|
2022-02-15 00:39:17 +00:00
|
|
|
jsTest {
|
|
|
|
dependencies {
|
|
|
|
implementation kotlin("test-js") // don't know why this dependency is needed here, it's not needed e.g. in fints4k project
|
|
|
|
}
|
|
|
|
}
|
2022-02-12 15:31:46 +00:00
|
|
|
|
|
|
|
|
2020-07-11 10:03:28 +00:00
|
|
|
iosMain {
|
|
|
|
dependencies {
|
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
}
|
2020-07-11 10:03:28 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 11:49:55 +00:00
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-11 10:03:28 +00:00
|
|
|
}
|
|
|
|
}
|