2024-08-14 19:01:35 +00:00
|
|
|
@file:OptIn(ExperimentalWasmDsl::class)
|
|
|
|
|
2024-08-18 16:36:11 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
2024-08-14 19:01:35 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
kotlin("multiplatform")
|
2024-08-16 23:50:48 +00:00
|
|
|
kotlin("plugin.noarg")
|
2024-08-18 16:37:09 +00:00
|
|
|
// kotlin("plugin.serialization")
|
2024-08-14 19:01:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
jvmToolchain(8)
|
|
|
|
|
2024-08-18 16:36:11 +00:00
|
|
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
|
|
|
compilerOptions {
|
|
|
|
// suppresses compiler warning: [EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING] 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta.
|
|
|
|
freeCompilerArgs.add("-Xexpect-actual-classes")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-08-14 19:01:35 +00:00
|
|
|
jvm {
|
|
|
|
withJava()
|
|
|
|
|
|
|
|
testRuns["test"].executionTask.configure {
|
|
|
|
useJUnitPlatform()
|
|
|
|
|
|
|
|
testLogging {
|
|
|
|
showExceptions = true
|
|
|
|
showStandardStreams = true
|
|
|
|
events("passed", "skipped", "failed")
|
|
|
|
// exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
js {
|
|
|
|
moduleName = "banking-client-model"
|
|
|
|
binaries.executable()
|
|
|
|
|
|
|
|
browser {
|
|
|
|
testTask {
|
|
|
|
useKarma {
|
|
|
|
useChromeHeadless()
|
|
|
|
useFirefoxHeadless()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
nodejs {
|
|
|
|
testTask {
|
|
|
|
useMocha {
|
|
|
|
timeout = "20s" // Mocha times out after 2 s, which is too short for bufferExceeded() test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
wasmJs()
|
|
|
|
|
|
|
|
|
|
|
|
linuxX64()
|
|
|
|
mingwX64()
|
|
|
|
|
2024-08-26 00:18:12 +00:00
|
|
|
iosX64()
|
2024-08-14 19:01:35 +00:00
|
|
|
iosArm64()
|
|
|
|
iosSimulatorArm64()
|
|
|
|
macosX64()
|
|
|
|
macosArm64()
|
|
|
|
watchosArm64()
|
|
|
|
watchosSimulatorArm64()
|
|
|
|
tvosArm64()
|
|
|
|
tvosSimulatorArm64()
|
|
|
|
|
|
|
|
applyDefaultHierarchyTemplate()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val kotlinxDateTimeVersion: String by project
|
|
|
|
val jsJodaTimeZoneVersion: String by project
|
2024-09-12 01:27:54 +00:00
|
|
|
val ionspinBigNumVersion: String by project
|
|
|
|
|
2024-08-14 19:01:35 +00:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
commonMain {
|
|
|
|
dependencies {
|
|
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime:$kotlinxDateTimeVersion")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
commonTest {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jvmMain {
|
|
|
|
dependencies {
|
2024-08-19 19:12:32 +00:00
|
|
|
compileOnly("com.fasterxml.jackson.core:jackson-annotations:2.15.0")
|
2024-08-14 19:01:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
jvmTest { }
|
|
|
|
|
|
|
|
jsMain {
|
|
|
|
dependencies {
|
|
|
|
api(npm("@js-joda/timezone", jsJodaTimeZoneVersion))
|
2024-09-12 01:27:54 +00:00
|
|
|
|
|
|
|
implementation(npm("big.js", "6.0.3"))
|
2024-08-14 19:01:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
jsTest { }
|
|
|
|
|
|
|
|
nativeMain { }
|
|
|
|
nativeTest { }
|
2024-09-12 01:27:54 +00:00
|
|
|
|
|
|
|
linuxMain {
|
|
|
|
dependencies {
|
|
|
|
implementation("com.ionspin.kotlin:bignum:$ionspinBigNumVersion")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mingwMain {
|
|
|
|
dependencies {
|
|
|
|
implementation("com.ionspin.kotlin:bignum:$ionspinBigNumVersion")
|
|
|
|
}
|
|
|
|
}
|
2024-08-14 19:01:35 +00:00
|
|
|
}
|
2024-08-16 14:55:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-08-16 23:50:48 +00:00
|
|
|
noArg {
|
|
|
|
annotation("net.codinux.accounting.common.config.NoArgConstructor")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-08-16 14:55:33 +00:00
|
|
|
|
|
|
|
ext["customArtifactId"] = "banking-client-model"
|
|
|
|
|
|
|
|
apply(from = "../gradle/scripts/publish-codinux.gradle.kts")
|