Hi! Is there a way to define an optional dependenc...
# gradle
b
Hi! Is there a way to define an optional dependency for Kotlin/Native, akin to how
compileOnly
works for other targets?
a
In short: no. related: KT-64109 tl;dr: it's a limitation of the Kotlin/Native compilation process, which requires dependencies are always present during compilation and runtime.
b
Thanks! That is what I was afraid of. This is really a pity. Espacially given how powerful the combination of extension functions and compile-only dependencies works on the jvm: add dependency 'A' to a project that has 'B' as compile-only dependency and defines some extensions on types of 'B'. You'll never notice. Once you add 'B' too, you magically get the extensions with IDE autocomplete. Are there any plans to remedy this shortcoming?
a
I'm not aware of any plans, unfortunately, but I don't work very closely with Kotlin Native. You could try asking in #C3SGXARS6.
thank you color 1