From 7a1d934dab09929ee32d61daf83cb50584e00d81 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 12 Sep 2022 15:07:22 +0600 Subject: [PATCH 1/2] start 0.5.2 --- CHANGELOG.md | 2 ++ gradle.properties | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f233ee9..a28e33b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 0.5.2 + ## 0.5.1 * New property `defaultMessageFormatterWithErrorPrint` for messages format with errors diff --git a/gradle.properties b/gradle.properties index af3915b..8ddbb46 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,5 +9,5 @@ android.enableJetifier=true # Project data group=dev.inmo -version=0.5.1 -android_code_version=14 +version=0.5.2 +android_code_version=15 From 0b142c7ff9e445af24ec9907a53ca4544f26496f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 12 Sep 2022 15:44:59 +0600 Subject: [PATCH 2/2] add native platforms support --- CHANGELOG.md | 8 ++++++++ build.gradle | 6 ++++++ gradle.properties | 1 + src/commonMain/kotlin/KSLog.kt | 3 +++ src/linuxArm32HfpMain/kotlin/DefaultLoggingActual.kt | 4 ++++ src/linuxArm64Main/kotlin/defaultLogging.kt | 4 ++++ src/linuxX64Main/kotlin/defaultLogging.kt | 4 ++++ src/mingwX64Main/kotlin/defaultLogging.kt | 4 ++++ src/mingwX86Main/kotlin/defaultLogging.kt | 4 ++++ src/wasm32Main/kotlin/defaultLogging.kt | 4 ++++ 10 files changed, 42 insertions(+) create mode 100644 src/linuxArm32HfpMain/kotlin/DefaultLoggingActual.kt create mode 100644 src/linuxArm64Main/kotlin/defaultLogging.kt create mode 100644 src/linuxX64Main/kotlin/defaultLogging.kt create mode 100644 src/mingwX64Main/kotlin/defaultLogging.kt create mode 100644 src/mingwX86Main/kotlin/defaultLogging.kt create mode 100644 src/wasm32Main/kotlin/defaultLogging.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index a28e33b..823de4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ## 0.5.2 +* Add support of next platform: + * Linux ARM x64 + * Linux ARM x32 HFP + * Linux x64 + * WASM x32 + * MinGW x64 + * MinGW x86 + ## 0.5.1 * New property `defaultMessageFormatterWithErrorPrint` for messages format with errors diff --git a/build.gradle b/build.gradle index ed4464b..4fb6698 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,12 @@ kotlin { android { publishAllLibraryVariants() } + linuxArm64() + linuxArm32Hfp() + linuxX64() + wasm32() + mingwX64() + mingwX86() sourceSets { commonMain { diff --git a/gradle.properties b/gradle.properties index 8ddbb46..1810ae2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,7 @@ kotlin.incremental=true kotlin.incremental.js=true android.useAndroidX=true android.enableJetifier=true +org.gradle.jvmargs=-Xmx196m # Project data diff --git a/src/commonMain/kotlin/KSLog.kt b/src/commonMain/kotlin/KSLog.kt index 40d8270..60fe5d0 100644 --- a/src/commonMain/kotlin/KSLog.kt +++ b/src/commonMain/kotlin/KSLog.kt @@ -62,6 +62,9 @@ interface KSLog { operator fun KSLog.invoke(performLogCallback: (level: LogLevel, tag: String?, message: Any, throwable: Throwable?) -> Unit) = CallbackKSLog(performLogCallback) internal expect val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit +internal val printlnLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit = { l, t, m, e -> + println(defaultMessageFormatter(l, t, m, e)) +} fun KSLog( defaultTag: String, diff --git a/src/linuxArm32HfpMain/kotlin/DefaultLoggingActual.kt b/src/linuxArm32HfpMain/kotlin/DefaultLoggingActual.kt new file mode 100644 index 0000000..295deef --- /dev/null +++ b/src/linuxArm32HfpMain/kotlin/DefaultLoggingActual.kt @@ -0,0 +1,4 @@ +package dev.inmo.kslog.common + +internal actual val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit + get() = printlnLogging diff --git a/src/linuxArm64Main/kotlin/defaultLogging.kt b/src/linuxArm64Main/kotlin/defaultLogging.kt new file mode 100644 index 0000000..295deef --- /dev/null +++ b/src/linuxArm64Main/kotlin/defaultLogging.kt @@ -0,0 +1,4 @@ +package dev.inmo.kslog.common + +internal actual val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit + get() = printlnLogging diff --git a/src/linuxX64Main/kotlin/defaultLogging.kt b/src/linuxX64Main/kotlin/defaultLogging.kt new file mode 100644 index 0000000..295deef --- /dev/null +++ b/src/linuxX64Main/kotlin/defaultLogging.kt @@ -0,0 +1,4 @@ +package dev.inmo.kslog.common + +internal actual val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit + get() = printlnLogging diff --git a/src/mingwX64Main/kotlin/defaultLogging.kt b/src/mingwX64Main/kotlin/defaultLogging.kt new file mode 100644 index 0000000..295deef --- /dev/null +++ b/src/mingwX64Main/kotlin/defaultLogging.kt @@ -0,0 +1,4 @@ +package dev.inmo.kslog.common + +internal actual val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit + get() = printlnLogging diff --git a/src/mingwX86Main/kotlin/defaultLogging.kt b/src/mingwX86Main/kotlin/defaultLogging.kt new file mode 100644 index 0000000..295deef --- /dev/null +++ b/src/mingwX86Main/kotlin/defaultLogging.kt @@ -0,0 +1,4 @@ +package dev.inmo.kslog.common + +internal actual val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit + get() = printlnLogging diff --git a/src/wasm32Main/kotlin/defaultLogging.kt b/src/wasm32Main/kotlin/defaultLogging.kt new file mode 100644 index 0000000..295deef --- /dev/null +++ b/src/wasm32Main/kotlin/defaultLogging.kt @@ -0,0 +1,4 @@ +package dev.inmo.kslog.common + +internal actual val defaultLogging: (level: LogLevel, tag: String, message: Any, throwable: Throwable?) -> Unit + get() = printlnLogging