From 55a84adcc2e88415fda6e7ad809ddef902781de1 Mon Sep 17 00:00:00 2001 From: holloszaboakos Date: Tue, 16 Jan 2024 09:11:13 +0100 Subject: [PATCH] Separated logger from foundation to a new module (#2131) --- korge-foundation/build.gradle.kts | 1 + korlibs-logger/.gitignore | 1 + korlibs-logger/build.gradle.kts | 23 +++++++++++++++++++ .../src/korlibs/logger/AnsiEscape.kt | 0 .../src/korlibs/logger/Console.kt | 0 .../src/korlibs/logger/Logger.kt | 0 .../korlibs/logger/Logger.android.kt | 0 .../korlibs/logger/Logger.darwin.kt | 0 .../src@js/korlibs/logger/Logger.js.kt | 0 .../src@jvm/korlibs/logger/Logger.jvm.kt | 0 .../src@wasmJs/korlibs/logger/Logger.wasm.kt | 0 .../korlibs/logger/test/AnsiEscapeTest.kt | 0 .../korlibs/logger/test/ConsolePlainTest.kt | 0 .../test/korlibs/logger/test/Logger2Test.kt | 0 .../test/korlibs/logger/test/LoggerTest.kt | 0 .../logger/test/LoggerMultithreadedTest.kt | 0 settings.gradle.kts | 1 + 17 files changed, 26 insertions(+) create mode 100644 korlibs-logger/.gitignore create mode 100644 korlibs-logger/build.gradle.kts rename {korge-foundation => korlibs-logger}/src/korlibs/logger/AnsiEscape.kt (100%) rename {korge-foundation => korlibs-logger}/src/korlibs/logger/Console.kt (100%) rename {korge-foundation => korlibs-logger}/src/korlibs/logger/Logger.kt (100%) rename {korge-foundation => korlibs-logger}/src@android/korlibs/logger/Logger.android.kt (100%) rename {korge-foundation => korlibs-logger}/src@darwin/korlibs/logger/Logger.darwin.kt (100%) rename {korge-foundation => korlibs-logger}/src@js/korlibs/logger/Logger.js.kt (100%) rename {korge-foundation => korlibs-logger}/src@jvm/korlibs/logger/Logger.jvm.kt (100%) rename {korge-foundation => korlibs-logger}/src@wasmJs/korlibs/logger/Logger.wasm.kt (100%) rename {korge-foundation => korlibs-logger}/test/korlibs/logger/test/AnsiEscapeTest.kt (100%) rename {korge-foundation => korlibs-logger}/test/korlibs/logger/test/ConsolePlainTest.kt (100%) rename {korge-foundation => korlibs-logger}/test/korlibs/logger/test/Logger2Test.kt (100%) rename {korge-foundation => korlibs-logger}/test/korlibs/logger/test/LoggerTest.kt (100%) rename {korge-foundation => korlibs-logger}/test@darwin/korlibs/logger/test/LoggerMultithreadedTest.kt (100%) diff --git a/korge-foundation/build.gradle.kts b/korge-foundation/build.gradle.kts index 9e0d7f3fca..e5af807998 100644 --- a/korge-foundation/build.gradle.kts +++ b/korge-foundation/build.gradle.kts @@ -26,4 +26,5 @@ dependencies { commonMainApi(project(":korlibs-crypto")) commonMainApi(project(":korlibs-platform")) commonMainApi(project(":korlibs-datastructure")) + commonMainApi(project(":korlibs-logger")) } diff --git a/korlibs-logger/.gitignore b/korlibs-logger/.gitignore new file mode 100644 index 0000000000..796b96d1c4 --- /dev/null +++ b/korlibs-logger/.gitignore @@ -0,0 +1 @@ +/build diff --git a/korlibs-logger/build.gradle.kts b/korlibs-logger/build.gradle.kts new file mode 100644 index 0000000000..5d00ac236a --- /dev/null +++ b/korlibs-logger/build.gradle.kts @@ -0,0 +1,23 @@ +import korlibs.* + +description = "Korlibs Logger" + +project.extensions.extraProperties.properties.apply { + applyProjectProperties( + "https://raw.githubusercontent.com/korlibs/korge/main/korlibs-logger", + "Public Domain", + "https://raw.githubusercontent.com/korlibs/korge/main/korlibs-logger/LICENSE" + ) +} + +dependencies { + commonMainApi(libs.kotlinx.coroutines.core) + commonMainApi(libs.kotlinx.atomicfu) + commonTestApi(libs.kotlinx.coroutines.test) + commonMainApi(libs.kotlinx.atomicfu) + commonTestApi(libs.kotlinx.coroutines.test) + commonMainApi(project(":korlibs-time")) + commonMainApi(project(":korlibs-crypto")) + commonMainApi(project(":korlibs-platform")) + commonMainApi(project(":korlibs-datastructure")) +} diff --git a/korge-foundation/src/korlibs/logger/AnsiEscape.kt b/korlibs-logger/src/korlibs/logger/AnsiEscape.kt similarity index 100% rename from korge-foundation/src/korlibs/logger/AnsiEscape.kt rename to korlibs-logger/src/korlibs/logger/AnsiEscape.kt diff --git a/korge-foundation/src/korlibs/logger/Console.kt b/korlibs-logger/src/korlibs/logger/Console.kt similarity index 100% rename from korge-foundation/src/korlibs/logger/Console.kt rename to korlibs-logger/src/korlibs/logger/Console.kt diff --git a/korge-foundation/src/korlibs/logger/Logger.kt b/korlibs-logger/src/korlibs/logger/Logger.kt similarity index 100% rename from korge-foundation/src/korlibs/logger/Logger.kt rename to korlibs-logger/src/korlibs/logger/Logger.kt diff --git a/korge-foundation/src@android/korlibs/logger/Logger.android.kt b/korlibs-logger/src@android/korlibs/logger/Logger.android.kt similarity index 100% rename from korge-foundation/src@android/korlibs/logger/Logger.android.kt rename to korlibs-logger/src@android/korlibs/logger/Logger.android.kt diff --git a/korge-foundation/src@darwin/korlibs/logger/Logger.darwin.kt b/korlibs-logger/src@darwin/korlibs/logger/Logger.darwin.kt similarity index 100% rename from korge-foundation/src@darwin/korlibs/logger/Logger.darwin.kt rename to korlibs-logger/src@darwin/korlibs/logger/Logger.darwin.kt diff --git a/korge-foundation/src@js/korlibs/logger/Logger.js.kt b/korlibs-logger/src@js/korlibs/logger/Logger.js.kt similarity index 100% rename from korge-foundation/src@js/korlibs/logger/Logger.js.kt rename to korlibs-logger/src@js/korlibs/logger/Logger.js.kt diff --git a/korge-foundation/src@jvm/korlibs/logger/Logger.jvm.kt b/korlibs-logger/src@jvm/korlibs/logger/Logger.jvm.kt similarity index 100% rename from korge-foundation/src@jvm/korlibs/logger/Logger.jvm.kt rename to korlibs-logger/src@jvm/korlibs/logger/Logger.jvm.kt diff --git a/korge-foundation/src@wasmJs/korlibs/logger/Logger.wasm.kt b/korlibs-logger/src@wasmJs/korlibs/logger/Logger.wasm.kt similarity index 100% rename from korge-foundation/src@wasmJs/korlibs/logger/Logger.wasm.kt rename to korlibs-logger/src@wasmJs/korlibs/logger/Logger.wasm.kt diff --git a/korge-foundation/test/korlibs/logger/test/AnsiEscapeTest.kt b/korlibs-logger/test/korlibs/logger/test/AnsiEscapeTest.kt similarity index 100% rename from korge-foundation/test/korlibs/logger/test/AnsiEscapeTest.kt rename to korlibs-logger/test/korlibs/logger/test/AnsiEscapeTest.kt diff --git a/korge-foundation/test/korlibs/logger/test/ConsolePlainTest.kt b/korlibs-logger/test/korlibs/logger/test/ConsolePlainTest.kt similarity index 100% rename from korge-foundation/test/korlibs/logger/test/ConsolePlainTest.kt rename to korlibs-logger/test/korlibs/logger/test/ConsolePlainTest.kt diff --git a/korge-foundation/test/korlibs/logger/test/Logger2Test.kt b/korlibs-logger/test/korlibs/logger/test/Logger2Test.kt similarity index 100% rename from korge-foundation/test/korlibs/logger/test/Logger2Test.kt rename to korlibs-logger/test/korlibs/logger/test/Logger2Test.kt diff --git a/korge-foundation/test/korlibs/logger/test/LoggerTest.kt b/korlibs-logger/test/korlibs/logger/test/LoggerTest.kt similarity index 100% rename from korge-foundation/test/korlibs/logger/test/LoggerTest.kt rename to korlibs-logger/test/korlibs/logger/test/LoggerTest.kt diff --git a/korge-foundation/test@darwin/korlibs/logger/test/LoggerMultithreadedTest.kt b/korlibs-logger/test@darwin/korlibs/logger/test/LoggerMultithreadedTest.kt similarity index 100% rename from korge-foundation/test@darwin/korlibs/logger/test/LoggerMultithreadedTest.kt rename to korlibs-logger/test@darwin/korlibs/logger/test/LoggerMultithreadedTest.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index 2aad739221..f7271f4a4d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -37,6 +37,7 @@ include(":korge-gradle-plugin") include(":korge-gradle-plugin-common") include(":korge-gradle-plugin-settings") include(":korge-reload-agent") +include("korlibs-logger") if (System.getenv("DISABLE_SANDBOX") != "true") { include(":korge-sandbox") }