From d50f458ef4756691b31092d126b3b5a2e2c426f6 Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 11 Jul 2020 12:03:28 +0200 Subject: [PATCH] Extracted Logger to new module common --- common/build.gradle | 152 ++++++++++++++++++ .../multiplatform}/log/CachedLoggerFactory.kt | 2 +- .../utils/multiplatform}/log/ConsoleLogger.kt | 2 +- .../multiplatform}/log/ILoggerFactory.kt | 2 +- .../utils/multiplatform}/log/LogLevel.kt | 2 +- .../log/LogToConsoleLoggerFactory.kt | 2 +- .../utils/multiplatform}/log/Logger.kt | 2 +- .../utils/multiplatform}/log/LoggerBase.kt | 2 +- .../utils/multiplatform}/log/LoggerFactory.kt | 2 +- .../utils/multiplatform}/log/Slf4jLogger.kt | 2 +- .../multiplatform}/log/Slf4jLoggerFactory.kt | 2 +- common/src/main/AndroidManifest.xml | 5 + fints4k/build.gradle | 2 + .../net/dankito/banking/fints/FinTsClient.kt | 2 +- .../implementierte/sepa/SepaMessageCreator.kt | 1 - .../banking/fints/response/ResponseParser.kt | 2 +- .../banking/fints/tan/FlickerCodeDecoder.kt | 2 +- .../banking/fints/tan/TanImageDecoder.kt | 2 +- .../Mt940AccountTransactionsParser.kt | 2 +- .../fints/transactions/mt940/Mt940Parser.kt | 2 +- .../banking/fints/util/MessageUtils.kt | 2 +- .../banking/fints/webclient/KtorWebClient.kt | 2 +- .../src/iosMain/kotlin/FinTsClientSwift.kt | 1 - settings.gradle | 2 + .../dankito/banking/fints4kBankingClient.kt | 2 + 25 files changed, 181 insertions(+), 20 deletions(-) create mode 100644 common/build.gradle rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/CachedLoggerFactory.kt (91%) rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/ConsoleLogger.kt (88%) rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/ILoggerFactory.kt (61%) rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/LogLevel.kt (76%) rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/LogToConsoleLoggerFactory.kt (78%) rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/Logger.kt (94%) rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/LoggerBase.kt (97%) rename {fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util => common/src/commonMain/kotlin/net/dankito/utils/multiplatform}/log/LoggerFactory.kt (90%) rename {fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util => common/src/jvmMain/kotlin/net/dankito/utils/multiplatform}/log/Slf4jLogger.kt (98%) rename {fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util => common/src/jvmMain/kotlin/net/dankito/utils/multiplatform}/log/Slf4jLoggerFactory.kt (82%) create mode 100644 common/src/main/AndroidManifest.xml diff --git a/common/build.gradle b/common/build.gradle new file mode 100644 index 00000000..806bf614 --- /dev/null +++ b/common/build.gradle @@ -0,0 +1,152 @@ +plugins { + id "org.jetbrains.kotlin.multiplatform" + id "com.android.library" + id "maven-publish" +} + + +ext.artifactName = "multiplatform-utils" + + +kotlin { + jvm { + compilations.main.kotlinOptions { + jvmTarget = "1.6" + } + } + + targets { + // Select iOS target for real device or emulator. + final def iOSIsRealDevice = System.getenv('SDK_NAME')?.startsWith("iphoneos") + final def iOSTarget = iOSIsRealDevice ? presets.iosArm64 : presets.iosX64 + + // iOS target. + fromPreset(iOSTarget, 'ios') { + binaries { + framework { + baseName = "fints4k" + } + } + } + } + + + sourceSets { + commonMain { + dependencies { + implementation kotlin("stdlib-common") + } + } + + commonTest { + dependencies { + implementation kotlin("test-common") + implementation kotlin("test-annotations-common") + + implementation "ch.tutteli.atrium:atrium-fluent-en_GB:$atriumVersion" + } + } + + + jvmMain { + dependencies { + api kotlin("stdlib-jdk7") + + compileOnly "org.slf4j:slf4j-api:$slf4jVersion" + } + } + + jvmTest { + dependencies { + implementation kotlin("test-junit") + + implementation "org.junit.jupiter:junit-jupiter:$junit5Version" + runtimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version" + + implementation "org.assertj:assertj-core:$assertJVersion" + implementation "org.mockito:mockito-core:$mockitoVersion" + + implementation "ch.tutteli.atrium:atrium-api-fluent-en_GB-jdk8:$atriumVersion" + + implementation "org.slf4j:slf4j-simple:$slf4jVersion" + } + + } + + + iosMain { + dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion" + } + } + + } +} + + +// Task to generate iOS framework for xcode projects. +task packForXCode(type: Sync) { + + final File frameworkDir = new File(buildDir, "xcode-frameworks") + final String mode = project.findProperty("XCODE_CONFIGURATION")?.toUpperCase() ?: 'DEBUG' + + final def framework = kotlin.targets.ios.binaries.getFramework("", mode) + + inputs.property "mode", mode + dependsOn framework.linkTask + + from { framework.outputFile.parentFile } + into frameworkDir + + doLast { + new File(frameworkDir, 'gradlew').with { + text = "#!/bin/bash\nexport 'JAVA_HOME=${System.getProperty("java.home")}'\ncd '${rootProject.rootDir}'\n./gradlew \$@\n" + setExecutable(true) + } + } +} + +// Run packForXCode when building. +tasks.build.dependsOn packForXCode + + +android { + compileSdkVersion androidCompileSdkVersion + + + defaultConfig { + minSdkVersion androidMinSdkVersion + targetSdkVersion androidTargetSdkVersion + + versionName version + versionCode appVersionCode + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + packagingOptions { + pickFirst 'META-INF/ktor-http.kotlin_module' + pickFirst 'META-INF/kotlinx-io.kotlin_module' + pickFirst 'META-INF/atomicfu.kotlin_module' + pickFirst 'META-INF/ktor-utils.kotlin_module' + pickFirst 'META-INF/kotlinx-coroutines-io.kotlin_module' + pickFirst 'META-INF/ktor-client-core.kotlin_module' + pickFirst 'META-INF/DEPENDENCIES' + pickFirst 'META-INF/NOTICE' + pickFirst 'META-INF/LICENSE' + pickFirst 'META-INF/LICENSE.txt' + pickFirst 'META-INF/NOTICE.txt' + } + + lintOptions { + abortOnError false + } + +} \ No newline at end of file diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/CachedLoggerFactory.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/CachedLoggerFactory.kt similarity index 91% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/CachedLoggerFactory.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/CachedLoggerFactory.kt index 045e05f6..8d41021e 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/CachedLoggerFactory.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/CachedLoggerFactory.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log abstract class CachedLoggerFactory : ILoggerFactory { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/ConsoleLogger.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/ConsoleLogger.kt similarity index 88% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/ConsoleLogger.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/ConsoleLogger.kt index 95ed2085..654242fd 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/ConsoleLogger.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/ConsoleLogger.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log import com.soywiz.klock.DateTime diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/ILoggerFactory.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/ILoggerFactory.kt similarity index 61% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/ILoggerFactory.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/ILoggerFactory.kt index 9e10254b..fc3b99f0 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/ILoggerFactory.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/ILoggerFactory.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log interface ILoggerFactory { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LogLevel.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LogLevel.kt similarity index 76% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LogLevel.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LogLevel.kt index c0fc28e7..a02e1c17 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LogLevel.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LogLevel.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log enum class LogLevel(val priority: Int) { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LogToConsoleLoggerFactory.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LogToConsoleLoggerFactory.kt similarity index 78% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LogToConsoleLoggerFactory.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LogToConsoleLoggerFactory.kt index 016dbf8e..20788519 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LogToConsoleLoggerFactory.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LogToConsoleLoggerFactory.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log open class LogToConsoleLoggerFactory : CachedLoggerFactory() { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/Logger.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/Logger.kt similarity index 94% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/Logger.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/Logger.kt index 67fe73d5..b14be556 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/Logger.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/Logger.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log interface Logger { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LoggerBase.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LoggerBase.kt similarity index 97% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LoggerBase.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LoggerBase.kt index 890a7b56..1b197a6c 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LoggerBase.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LoggerBase.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log abstract class LoggerBase( diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LoggerFactory.kt b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LoggerFactory.kt similarity index 90% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LoggerFactory.kt rename to common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LoggerFactory.kt index d1f63956..fdc2e5a7 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/log/LoggerFactory.kt +++ b/common/src/commonMain/kotlin/net/dankito/utils/multiplatform/log/LoggerFactory.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log import kotlin.reflect.KClass diff --git a/fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util/log/Slf4jLogger.kt b/common/src/jvmMain/kotlin/net/dankito/utils/multiplatform/log/Slf4jLogger.kt similarity index 98% rename from fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util/log/Slf4jLogger.kt rename to common/src/jvmMain/kotlin/net/dankito/utils/multiplatform/log/Slf4jLogger.kt index 61e843f5..975e5ce9 100644 --- a/fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util/log/Slf4jLogger.kt +++ b/common/src/jvmMain/kotlin/net/dankito/utils/multiplatform/log/Slf4jLogger.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log open class Slf4jLogger(protected val slf4jLogger: org.slf4j.Logger) : Logger { diff --git a/fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util/log/Slf4jLoggerFactory.kt b/common/src/jvmMain/kotlin/net/dankito/utils/multiplatform/log/Slf4jLoggerFactory.kt similarity index 82% rename from fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util/log/Slf4jLoggerFactory.kt rename to common/src/jvmMain/kotlin/net/dankito/utils/multiplatform/log/Slf4jLoggerFactory.kt index 9226e901..c4c94cb7 100644 --- a/fints4k/src/jvm6Main/kotlin/net/dankito/banking/fints/util/log/Slf4jLoggerFactory.kt +++ b/common/src/jvmMain/kotlin/net/dankito/utils/multiplatform/log/Slf4jLoggerFactory.kt @@ -1,4 +1,4 @@ -package net.dankito.banking.fints.util.log +package net.dankito.utils.multiplatform.log import org.slf4j.LoggerFactory diff --git a/common/src/main/AndroidManifest.xml b/common/src/main/AndroidManifest.xml new file mode 100644 index 00000000..d7b5d1bf --- /dev/null +++ b/common/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/fints4k/build.gradle b/fints4k/build.gradle index 2736a014..cb484374 100644 --- a/fints4k/build.gradle +++ b/fints4k/build.gradle @@ -59,6 +59,8 @@ kotlin { implementation kotlin("stdlib-common") implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$kotlinCoroutinesVersion" + api project(":common") + implementation "io.ktor:ktor-client-core:$ktorVersion" api "com.soywiz.korlibs.klock:klock:$klockVersion" diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt index ad68ae0d..9f680ce9 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt @@ -31,7 +31,7 @@ import net.dankito.banking.fints.transactions.IAccountTransactionsParser import net.dankito.banking.fints.transactions.Mt940AccountTransactionsParser import net.dankito.banking.fints.util.IBase64Service import net.dankito.banking.fints.util.PureKotlinBase64Service -import net.dankito.banking.fints.util.log.LoggerFactory +import net.dankito.utils.multiplatform.log.LoggerFactory import net.dankito.banking.fints.webclient.IWebClient import net.dankito.banking.fints.webclient.KtorWebClient import net.dankito.banking.fints.webclient.WebClientResponse diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt index 95817052..5f65d1de 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt @@ -2,7 +2,6 @@ package net.dankito.banking.fints.messages.segmente.implementierte.sepa import com.soywiz.klock.DateFormat import com.soywiz.klock.DateTime -import net.dankito.banking.fints.util.log.LoggerFactory /** diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt index 1cf9dcc3..b016d1f1 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/response/ResponseParser.kt @@ -20,7 +20,7 @@ import net.dankito.banking.fints.messages.segmente.id.MessageSegmentId import net.dankito.banking.fints.model.Amount import net.dankito.banking.fints.response.segments.* import net.dankito.banking.fints.util.MessageUtils -import net.dankito.banking.fints.util.log.LoggerFactory +import net.dankito.utils.multiplatform.log.LoggerFactory open class ResponseParser( diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/FlickerCodeDecoder.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/FlickerCodeDecoder.kt index d2761dd1..8617f49a 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/FlickerCodeDecoder.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/FlickerCodeDecoder.kt @@ -1,7 +1,7 @@ package net.dankito.banking.fints.tan import net.dankito.banking.fints.model.HHDVersion -import net.dankito.banking.fints.util.log.LoggerFactory +import net.dankito.utils.multiplatform.log.LoggerFactory open class FlickerCodeDecoder { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/TanImageDecoder.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/TanImageDecoder.kt index e1e42f45..3741e43f 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/TanImageDecoder.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/tan/TanImageDecoder.kt @@ -2,7 +2,7 @@ package net.dankito.banking.fints.tan import io.ktor.utils.io.core.toByteArray import net.dankito.banking.fints.messages.HbciCharset -import net.dankito.banking.fints.util.log.LoggerFactory +import net.dankito.utils.multiplatform.log.LoggerFactory open class TanImageDecoder { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/Mt940AccountTransactionsParser.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/Mt940AccountTransactionsParser.kt index f9979e28..96f30d6c 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/Mt940AccountTransactionsParser.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/Mt940AccountTransactionsParser.kt @@ -10,7 +10,7 @@ import net.dankito.banking.fints.transactions.mt940.model.AccountStatement import net.dankito.banking.fints.transactions.mt940.model.Balance import net.dankito.banking.fints.transactions.mt940.model.Transaction import net.dankito.banking.fints.transactions.mt940.model.StatementLine -import net.dankito.banking.fints.util.log.LoggerFactory +import net.dankito.utils.multiplatform.log.LoggerFactory open class Mt940AccountTransactionsParser( diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt index d5ae5ef8..8e03fe16 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/transactions/mt940/Mt940Parser.kt @@ -3,7 +3,7 @@ package net.dankito.banking.fints.transactions.mt940 import com.soywiz.klock.* import net.dankito.banking.fints.model.Amount import net.dankito.banking.fints.transactions.mt940.model.* -import net.dankito.banking.fints.util.log.LoggerFactory +import net.dankito.utils.multiplatform.log.LoggerFactory /* diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt index 285ccb3f..568f08a8 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/util/MessageUtils.kt @@ -1,7 +1,7 @@ package net.dankito.banking.fints.util import net.dankito.banking.fints.messages.Separators -import net.dankito.banking.fints.response.ResponseParser +import net.dankito.banking.fints.messages.segmente.id.MessageSegmentId open class MessageUtils { diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/webclient/KtorWebClient.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/webclient/KtorWebClient.kt index 72367bd9..1d10b5bc 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/webclient/KtorWebClient.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/webclient/KtorWebClient.kt @@ -9,7 +9,7 @@ import io.ktor.http.ContentType import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.async import kotlinx.coroutines.cancel -import net.dankito.banking.fints.util.log.LoggerFactory +import net.dankito.utils.multiplatform.log.LoggerFactory open class KtorWebClient : IWebClient { diff --git a/fints4k/src/iosMain/kotlin/FinTsClientSwift.kt b/fints4k/src/iosMain/kotlin/FinTsClientSwift.kt index df7c0d05..f456b2b0 100644 --- a/fints4k/src/iosMain/kotlin/FinTsClientSwift.kt +++ b/fints4k/src/iosMain/kotlin/FinTsClientSwift.kt @@ -7,7 +7,6 @@ import net.dankito.banking.fints.model.CustomerData import net.dankito.banking.fints.response.client.AddAccountResponse import net.dankito.banking.fints.response.client.FinTsClientResponse import net.dankito.banking.fints.response.client.GetTransactionsResponse -import net.dankito.banking.fints.util.log.LoggerFactory import net.dankito.banking.fints.webclient.IWebClient import kotlin.native.concurrent.TransferMode import kotlin.native.concurrent.Worker diff --git a/settings.gradle b/settings.gradle index 1063955c..8f4e4707 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,6 +6,8 @@ enableFeaturePreview('GRADLE_METADATA') // for klock include ':fints4k' include ':fints4k-jvm' +include ':common' + /* UI */ diff --git a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4kBankingClient.kt b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4kBankingClient.kt index 8a5ad060..293911ac 100644 --- a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4kBankingClient.kt +++ b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4kBankingClient.kt @@ -25,6 +25,8 @@ import net.dankito.banking.fints.webclient.KtorWebClient import net.dankito.banking.bankfinder.BankInfo import net.dankito.banking.extensions.toAmount import net.dankito.banking.extensions.toMoney +import net.dankito.utils.multiplatform.log.Slf4jLoggerFactory +import net.dankito.utils.multiplatform.toDate import org.slf4j.LoggerFactory import java.io.File import java.math.BigDecimal