Fixed dependencies without FinTs4kBankingClient

This commit is contained in:
dankito 2024-08-25 02:37:14 +02:00
parent 8808843392
commit 6fc01ad285
3 changed files with 12 additions and 2 deletions

View File

@ -11,6 +11,7 @@ plugins {
alias(libs.plugins.compose.compiler)
}
kotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
@ -54,6 +55,8 @@ kotlin {
val desktopMain by getting
commonMain.dependencies {
implementation(libs.banking.client.model)
implementation(libs.kcsv)
implementation(libs.klf)

View File

@ -4,12 +4,11 @@ import androidx.compose.ui.graphics.Color
import kotlinx.datetime.LocalDate
import kotlinx.datetime.Month
import net.codinux.banking.client.model.Amount
import net.codinux.banking.fints.extensions.toStringWithMinDigits
class FormatUtil {
fun formatDate(date: LocalDate): String = // TODO: find a better way
"${date.dayOfMonth.toStringWithMinDigits(2)}.${date.monthNumber.toStringWithMinDigits(2)}.${date.year.toString().substring(2)}"
"${minDigits(date.dayOfMonth, 2)}.${minDigits(date.monthNumber, 2)}.${date.year.toString().substring(2)}"
fun formatMonth(date: LocalDate): String = // TODO: find a better way
"${getMonthName(date.month)} ${date.year}"
@ -48,4 +47,8 @@ class FormatUtil {
else -> Color.Green
}
fun minDigits(toConvert: Int, minDigits: Int): String =
toConvert.toString().padStart(minDigits, '0')
}

View File

@ -2,6 +2,8 @@
kotlin = "2.0.10"
kotlinx-coroutines = "1.8.1"
banking-client = "0.5.1-SNAPSHOT"
kcsv = "2.1.1"
klf = "1.5.1"
@ -22,6 +24,8 @@ compose-plugin = "1.6.11"
junit = "4.13.2"
[libraries]
banking-client-model = { group = "net.codinux.banking.client", name = "banking-client-model", version.ref = "banking-client" }
kcsv = { group = "net.codinux.csv", name = "kcsv", version.ref = "kcsv" }
klf = { group = "net.codinux.log", name = "kmp-log", version.ref = "klf" }