From f5308f272329cdd3e02878bdedafc9ee6de2ab82 Mon Sep 17 00:00:00 2001 From: Vitaly Pestryakov <34812712+dsvag@users.noreply.github.com> Date: Sun, 3 Dec 2023 16:51:36 +0200 Subject: [PATCH 1/3] bump kotlin and migration --- .../vivid/money/elmslie/core/logger/ElmslieLogConfiguration.kt | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elmslie-core/src/main/java/vivid/money/elmslie/core/logger/ElmslieLogConfiguration.kt b/elmslie-core/src/main/java/vivid/money/elmslie/core/logger/ElmslieLogConfiguration.kt index 38788d7d..50d255e1 100644 --- a/elmslie-core/src/main/java/vivid/money/elmslie/core/logger/ElmslieLogConfiguration.kt +++ b/elmslie-core/src/main/java/vivid/money/elmslie/core/logger/ElmslieLogConfiguration.kt @@ -23,7 +23,7 @@ class ElmslieLogConfiguration { /** Apply the same logging strategy to all log levels */ fun always(strategy: LogStrategy) = apply { - LogSeverity.values().forEach { strategies[it] = strategy } + LogSeverity.entries.forEach { strategies[it] = strategy } } internal fun build() = ElmslieLogger(strategies) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b428400d..f7570ec3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ agp = "8.0.2" coroutines = "1.7.1" dokka = "1.8.20" -kotlin = "1.8.21" +kotlin = "1.9.21" lifecycle = "2.6.1" [libraries] From c56a35cab1d5bd7ca3b5633f27b4e5f70fdc397b Mon Sep 17 00:00:00 2001 From: Vitaly Pestryakov <34812712+dsvag@users.noreply.github.com> Date: Sun, 3 Dec 2023 16:53:49 +0200 Subject: [PATCH 2/3] rename old kotlin plugin to kotlin jvm --- ....kotlin-lib.gradle.kts => elmslie.kotlin-jvm-lib.gradle.kts} | 0 elmslie-core/build.gradle.kts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename build-logic/src/main/kotlin/{elmslie.kotlin-lib.gradle.kts => elmslie.kotlin-jvm-lib.gradle.kts} (100%) diff --git a/build-logic/src/main/kotlin/elmslie.kotlin-lib.gradle.kts b/build-logic/src/main/kotlin/elmslie.kotlin-jvm-lib.gradle.kts similarity index 100% rename from build-logic/src/main/kotlin/elmslie.kotlin-lib.gradle.kts rename to build-logic/src/main/kotlin/elmslie.kotlin-jvm-lib.gradle.kts diff --git a/elmslie-core/build.gradle.kts b/elmslie-core/build.gradle.kts index cd9b76a3..a16e6bdd 100644 --- a/elmslie-core/build.gradle.kts +++ b/elmslie-core/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("elmslie.kotlin-lib") + id("elmslie.kotlin-jvm-lib") id("elmslie.tests-convention") } From 689f404330d3d8e345b8a96c9d9b3bb2edbf4329 Mon Sep 17 00:00:00 2001 From: Vitaly Pestryakov <34812712+dsvag@users.noreply.github.com> Date: Sun, 3 Dec 2023 17:04:53 +0200 Subject: [PATCH 3/3] implement kotlin multiplatform plugin --- ...lmslie.kotlin-multiplatform-lib.gradle.kts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts diff --git a/build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts b/build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts new file mode 100644 index 00000000..a85a9692 --- /dev/null +++ b/build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts @@ -0,0 +1,22 @@ +@file:Suppress("UnstableApiUsage") + +plugins { + kotlin("multiplatform") + id("com.android.library") + id("elmslie.detekt") +} + +kotlin { + applyDefaultHierarchyTemplate() + + androidTarget { + compilations.all { + kotlinOptions { + jvmTarget = JvmTarget.toString() + } + } + } + + iosX64() + iosArm64() +}