If I have a `common` depedency, which itself bring...
# multiplatform
b
If I have a
common
depedency, which itself brings
-jvm
and
-android
dependency, is it possible to use the
-jvm
dependency in
androidMain
by excluding the
-android
dependency?
j
If there's a specific
-android
platform dependency, usually that's because the
-jvm
dependency wouldn't be compatible on Android. What's your reason for not wanting to use the
-android
dependency?
b
It's because
kotlin-logging
added an
-android
package in the new version, which uses
android.util.Log
, but we want to stay with Slf4J/Logback, which is still used in the
-jvm
package.
h
Does gradle not have any magic to exclude android.util.Log?
b
And then? I still need the
-jvm
package within the
android
target? Despite that,
kotlin-logging
has added a fix to use slf4j within Android target.
h
If logging is the only thing you'd like to alter, I think it would be better to exclude one logging library and explicitly include the one you want, rather than using a jvm target when an android target actually exists. But I am afk and cannot test or go into detail about anything.