Hi, does anyone know how to make something androids like BuildConfig.Debug but in ktor? I'm using gradle with groovy
g
gildor
06/10/2019, 12:27 PM
Could you please explain what you want to achieve and why do you need BuildConfig. Debug make sense for Android app (because you obviously cannot debug app in release mode), but there is no such thing for JVM app. If you just have different configs for prod/dev, just pass flag to Ktor config (see Ktor config docs)
p
pawelbochenski
06/10/2019, 12:31 PM
i want different execution paths during “debug” on released builds
g
gildor
06/10/2019, 1:18 PM
There is no such thing as debug build on JVM, you want different execution path, just pass some flag to configuration and read it on runtime
👍 1
r
russhwolf
06/10/2019, 3:24 PM
I've never tried it but you could look at the BuildKonfig library if you need a more platform-agnostic equivalent to Android's BuildConfig. https://github.com/yshrsmz/BuildKonfig
p
pawelbochenski
06/11/2019, 6:48 AM
Thanks for help! I guess I’ll go with flag solution !