2020-06-03 15:49:29 +00:00
|
|
|
plugins {
|
|
|
|
id "org.jetbrains.kotlin.multiplatform"
|
2020-06-14 18:30:34 +00:00
|
|
|
id "maven-publish"
|
2020-06-03 15:49:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-02-12 23:19:00 +00:00
|
|
|
allprojects {
|
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
|
|
|
// otherwise Kotlin throws an exception even though it is on the classpath:
|
|
|
|
// "Ktor native HttpClient requires kotlinx.coroutines version with `native-mt` suffix (like `1.3.9-native-mt`)"
|
|
|
|
force("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}-native-mt")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
kotlin {
|
2022-02-11 22:53:35 +00:00
|
|
|
jvm {
|
|
|
|
compilations.all {
|
|
|
|
kotlinOptions.jvmTarget = '1.8'
|
2020-06-03 15:49:29 +00:00
|
|
|
}
|
2022-02-11 22:53:35 +00:00
|
|
|
withJava()
|
|
|
|
testRuns["test"].executionTask.configure {
|
|
|
|
useJUnitPlatform()
|
2020-07-02 21:14:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-15 00:39:17 +00:00
|
|
|
js(IR) {
|
|
|
|
binaries.executable()
|
|
|
|
browser {
|
|
|
|
commonWebpackConfig {
|
|
|
|
cssSupport.enabled = true
|
|
|
|
}
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-02-11 22:53:35 +00:00
|
|
|
|
|
|
|
ios {
|
|
|
|
binaries {
|
|
|
|
framework {
|
|
|
|
baseName = "fints4k"
|
2020-06-09 21:55:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-12 23:19:00 +00:00
|
|
|
def hostOs = System.getProperty("os.name")
|
|
|
|
def isMingwX64 = hostOs.startsWith("Windows")
|
|
|
|
def nativeTarget
|
2022-02-13 21:59:09 +00:00
|
|
|
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() }
|
2022-02-12 23:19:00 +00:00
|
|
|
else throw new GradleException("Host OS is not supported in Kotlin/Native.")
|
2022-02-11 22:53:35 +00:00
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
commonMain {
|
|
|
|
dependencies {
|
2022-02-11 23:26:12 +00:00
|
|
|
api project(":multiplatform-utils")
|
2020-07-11 10:03:28 +00:00
|
|
|
|
2022-02-13 21:01:13 +00:00
|
|
|
implementation "co.touchlab:stately-concurrency:1.2.0"
|
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
|
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
implementation "io.ktor:ktor-client-core:$ktorVersion"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
commonTest {
|
|
|
|
dependencies {
|
2022-02-11 22:53:35 +00:00
|
|
|
implementation kotlin("test")
|
2020-06-03 15:49:29 +00:00
|
|
|
}
|
|
|
|
}
|
2019-10-02 17:54:11 +00:00
|
|
|
|
2020-05-14 20:40:42 +00:00
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
jvmMain {
|
2020-06-03 15:49:29 +00:00
|
|
|
dependencies {
|
|
|
|
implementation "io.ktor:ktor-client-okhttp:$ktorVersion"
|
2019-10-02 17:54:11 +00:00
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
implementation "org.slf4j:slf4j-api:$slf4jVersion"
|
|
|
|
}
|
|
|
|
}
|
2019-10-12 18:54:02 +00:00
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
jvmTest {
|
2020-06-03 15:49:29 +00:00
|
|
|
dependencies {
|
2020-04-23 22:50:14 +00:00
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
implementation "org.assertj:assertj-core:$assertJVersion"
|
|
|
|
implementation "org.mockito:mockito-core:$mockitoVersion"
|
2019-10-02 17:54:11 +00:00
|
|
|
|
2020-06-09 21:55:30 +00:00
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
// implementation project(":BankingUiCommon")
|
|
|
|
// implementation project(":BankFinder")
|
|
|
|
// implementation project(":fints4kBankingClient")
|
2020-06-09 21:55:30 +00:00
|
|
|
|
2019-10-02 17:54:11 +00:00
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
implementation "org.apache.commons:commons-csv:1.8"
|
2019-10-02 17:54:11 +00:00
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-02-15 00:39:17 +00:00
|
|
|
jsMain {
|
|
|
|
dependencies {
|
|
|
|
implementation "io.ktor:ktor-client-js:$ktorVersion"
|
|
|
|
}
|
|
|
|
}
|
2020-06-03 15:49:29 +00:00
|
|
|
|
|
|
|
|
2020-07-02 21:14:14 +00:00
|
|
|
iosMain {
|
|
|
|
dependencies {
|
2022-02-11 22:53:35 +00:00
|
|
|
// ktor Native needs "-native-mt" coroutines version. Export it so that referencing applications don't need to import it on their own
|
|
|
|
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion-native-mt")
|
2020-07-02 21:14:14 +00:00
|
|
|
|
|
|
|
implementation "io.ktor:ktor-client-ios:$ktorVersion"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-09 21:55:30 +00:00
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
nativeMain {
|
2020-06-09 21:55:30 +00:00
|
|
|
dependencies {
|
2022-02-11 22:53:35 +00:00
|
|
|
// ktor Native needs "-native-mt" coroutines version. Export it so that referencing applications don't need to import it on their own
|
2022-02-12 23:19:00 +00:00
|
|
|
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}-native-mt"
|
2020-06-09 21:55:30 +00:00
|
|
|
|
2022-02-11 22:53:35 +00:00
|
|
|
// requires cURL to be installed on your system
|
|
|
|
implementation "io.ktor:ktor-client-curl:$ktorVersion"
|
2022-02-22 00:47:14 +00:00
|
|
|
|
|
|
|
implementation "com.github.ajalt.clikt:clikt:3.4.0"
|
2020-06-09 21:55:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-03 15:49:29 +00:00
|
|
|
}
|
2019-10-02 17:54:11 +00:00
|
|
|
}
|