Skip to content

Commit d1e4e95

Browse files
committed
fix: class loader issue caused by logging libraries
- slf4j runtime is no longer provided by Toolbox - the sample code promotes the usage of service locator to resolve a logger. However, this approach has a couple of downsides, mainly it tightly couples all layers of code because the service locator needs to be propagated from the dev extension down to the lowest level of coder business implementation. - instead, we now pack tinylog with slf4j bindings to avoid classloading issues.
1 parent f6daa3e commit d1e4e95

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jvmWrapper {
3939
dependencies {
4040
compileOnly(libs.bundles.toolbox.plugin.api)
4141
implementation(libs.slf4j)
42+
implementation(libs.tinylog)
4243
implementation(libs.bundles.serialization)
4344
implementation(libs.coroutines.core)
4445
implementation(libs.okhttp)
@@ -111,7 +112,6 @@ val copyPlugin by tasks.creating(Sync::class.java) {
111112
"core-api",
112113
"ui-api",
113114
"annotations",
114-
"slf4j",
115115
).any { file.name.contains(it) }
116116
}
117117
},

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ coroutines = "1.7.3"
55
serialization = "1.5.0"
66
okhttp = "4.10.0"
77
slf4j = "2.0.3"
8+
tinylog = "2.7.0"
89
dependency-license-report = "2.5"
910
marketplace-client = "2.0.38"
1011
gradle-wrapper = "0.14.0"
@@ -23,6 +24,7 @@ serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-jso
2324
serialization-json-okio = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json-okio", version.ref = "serialization" }
2425
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
2526
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
27+
tinylog = {module = "org.tinylog:slf4j-tinylog", version.ref = "tinylog"}
2628
exec = { module = "org.zeroturnaround:zt-exec", version.ref = "exec" }
2729
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi"}
2830
moshi-codegen = { module = "com.squareup.moshi:moshi-kotlin-codegen", version.ref = "moshi"}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy