Skip to content

Commit 2b29826

Browse files
committed
Comment on optional dependencies in Gradle build file
1 parent 66466ca commit 2b29826

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,20 @@ kotlin {
107107
jvmMain.dependencies {
108108
implementation(libs.slf4j)
109109
implementation(libs.jackson)
110+
// Optional dependency: This library works for any SLF4J logger implementation, but makes some
111+
// optimizations for Logback. If the user chooses Logback as their logger implementation, we
112+
// can apply these optimizations, but if they don't, then we don't want to load Logback, as
113+
// that can interfere with other SLF4J logger implementations on the classpath.
110114
compileOnly(libs.logback)
115+
// Optional dependency - we only need this if the user:
116+
// - Has chosen Logback as their logger implementation
117+
// - Uses logstash-logback-encoder for encoding logs as JSON
118+
// - Wants to use our JsonContextFieldWriter
111119
compileOnly(libs.logstashLogbackEncoder)
112120
}
113121
jvmTest.dependencies {
114122
runtimeOnly(libs.logback)
115123
runtimeOnly(libs.logstashLogbackEncoder)
116-
runtimeOnly(libs.jackson)
117124
}
118125
}
119126

0 commit comments

Comments
 (0)