Has anyone setup their environment to use differen...
# multiplatform
j
Has anyone setup their environment to use different Kotlin version when building for Android and building for iOS?
3
Have situation at the moment where Kotlin/Native build needs to use 1.5.20 but on Android I need to use 1.5.10 due to Compose compatibility
h
Do you build your project for (android + core) and iOS in one single execution? If not, you could put the Kotlin plugin version into
settings.gradle.kts
and use some properties (eg the properties from XcodePackTasks) when building to use different Kotlin versions. But keep in mind, Kotlin native is not always binary compatible, don't know if it will work even locally...
j
Thanks @hfhbd, yeah seems like something like that should work....will give it a try
j
you can just get the Kotlin version from a Gradle property in
gradle.properties
, you can set it to 1.5.10 by default, and override it via cli, i.e.:
./gradlew build -P”kotlinVersion”=“1.5.20”
👍 2
j
Thanks @Javier, just tried that and seems to work well!
🙂 1
g
@Charles Prado ^
👍 1