fix(desktop): exclude leaked kotlinx-coroutines-test from release dmg

composemediaplayer 0.10.0 publishes kotlinx-coroutines-test as a runtime
dependency in its POM. That jar ships a META-INF/services registration for
kotlinx.coroutines.CoroutineExceptionHandler -> ExceptionCollectorAsService.
The release-only ProGuard pass strips the unreferenced provider class but
keeps the services manifest, so the packaged dmg crashed at startup with a
ServiceConfigurationError the first time the coroutine exception handler
loaded (DesktopHttpClient.<init>). Dev runs were unaffected since they don't
run ProGuard.

Exclude the test-only artifact so it never lands on the production classpath.
Verified: rebuilt release dmg no longer bundles the jar and launches clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vitor Pamplona
2026-06-16 17:52:48 -04:00
co-authored by Claude Opus 4.8
parent adcf71d43e
commit 3a21df7775
+10 -1
View File
@@ -56,7 +56,16 @@ dependencies {
implementation(libs.coil.svg)
// Video / audio playback — MIT, OS-native backends (MF / AVFoundation / GStreamer)
implementation(libs.composemediaplayer)
// composemediaplayer 0.10.0 leaks kotlinx-coroutines-test as a *runtime* dependency
// in its published POM. That jar ships a META-INF/services registration for
// kotlinx.coroutines.CoroutineExceptionHandler -> ExceptionCollectorAsService; the
// release ProGuard pass strips the (unreferenced) provider class but keeps the
// services file, so the packaged dmg crashes at startup with a
// ServiceConfigurationError the first time the coroutine exception handler loads.
// It is test-only code that must never be on the production classpath — exclude it.
implementation(libs.composemediaplayer) {
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-test")
}
// Thumbnail extraction — JCodec (pure-Java H.264). LGPL FFmpeg subprocess
// for non-H.264 / HLS fallback is invoked via plain ProcessBuilder; no