BankingClient/fints4k/build.gradle

151 lines
4.0 KiB
Groovy

plugins {
id "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlinVersion"
id "maven-publish"
}
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = '1.8'
}
withJava()
testRuns["test"].executionTask.configure {
useJUnitPlatform()
}
}
js(IR) {
binaries.executable()
browser {
testTask {
useKarma {
// we cannot assume that Chrome and Firefox are installed on all systems
// useChromeHeadless()
// useFirefox()
enabled = false
}
}
}
nodejs {
testTask {
useMocha {
enabled = true
}
testLogging {
events "failed"
}
}
}
}
ios {
binaries {
framework {
baseName = "fints4k"
}
}
}
def hostOs = System.getProperty("os.name")
def isMingwX64 = hostOs.startsWith("Windows")
def nativeTarget
if (hostOs == "Mac OS X") nativeTarget = macosX64('native') { binaries.executable() }
else if (hostOs == "Linux") nativeTarget = linuxX64("native") { binaries.executable() }
else if (isMingwX64) nativeTarget = mingwX64("native") { binaries.executable() }
else throw new GradleException("Host OS is not supported in Kotlin/Native.")
sourceSets {
commonMain {
dependencies {
api project(":multiplatform-utils")
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
implementation "co.touchlab:stately-concurrency:1.2.0"
implementation "io.ktor:ktor-client-core:$ktorVersion"
}
}
commonTest {
dependencies {
implementation kotlin("test-common")
implementation kotlin("test-annotations-common")
}
}
jvmMain {
dependencies {
implementation "io.ktor:ktor-client-okhttp:$ktorVersion"
implementation "org.slf4j:slf4j-api:$slf4jVersion"
}
}
jvmTest {
dependencies {
implementation "org.assertj:assertj-core:$assertJVersion"
implementation "org.mockito:mockito-core:$mockitoVersion"
// implementation project(":BankingUiCommon")
// implementation project(":BankFinder")
// implementation project(":fints4kBankingClient")
implementation "org.apache.commons:commons-csv:1.8"
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
}
}
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"
}
jsMain {
dependencies {
implementation "io.ktor:ktor-client-js:$ktorVersion"
}
}
jsTest.dependencies {
implementation kotlin("test-js")
}
iosMain {
dependencies {
implementation "io.ktor:ktor-client-ios:$ktorVersion"
}
}
nativeMain {
dependencies {
// requires cURL to be installed on your system
implementation "io.ktor:ktor-client-curl:$ktorVersion"
implementation "com.github.ajalt.clikt:clikt:3.4.0"
// only needed for writing files to output
implementation "com.soywiz.korlibs.korio:korio:2.5.0"
}
}
}
}