[WIP] Upgrade to Kotlin 2.2.0#828
Conversation
| composeUiVersion = "1.8.3" | ||
|
|
||
| # jetbrains compose | ||
| composeJetbrainsVersion = "1.6.0" | ||
| composeJetbrainsVersion = "1.8.2" |
There was a problem hiding this comment.
These had to be upgraded to versions that support Kotlin 2.0 and its newly-removed native targets.
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip |
There was a problem hiding this comment.
I'm not sure if this is necessary for the project to build, but Android Studio was really unhappy about the old Gradle version.
|
|
||
| fun KonanTarget.getAppleSdk(): String { | ||
| return when (this) { | ||
| KonanTarget.IOS_ARM32, |
There was a problem hiding this comment.
This target was removed in Kotlin 2.0.
| KonanTarget.WATCHOS_X64, | ||
| KonanTarget.WATCHOS_X86 -> "watchsimulator" |
There was a problem hiding this comment.
This target was removed in Kotlin 2.0.
|
|
||
| fun KonanTarget.getClangTarget(): String { | ||
| return when (this) { | ||
| KonanTarget.IOS_ARM32 -> "armv7-apple-ios" |
There was a problem hiding this comment.
This target was removed in Kotlin 2.0.
| KotlinPlatformType.androidJvm -> createAndroid() | ||
| KotlinPlatformType.js -> createJs() | ||
| KotlinPlatformType.native -> when (konanTarget()) { | ||
| KonanTarget.IOS_ARM32, |
There was a problem hiding this comment.
This target was removed in Kotlin 2.0.
| KonanTarget.WATCHOS_DEVICE_ARM64, | ||
| KonanTarget.WATCHOS_SIMULATOR_ARM64, | ||
| KonanTarget.WATCHOS_X64, | ||
| KonanTarget.WATCHOS_X86 -> createApple() |
There was a problem hiding this comment.
This target was removed in Kotlin 2.0.
| KonanTarget.LINUX_MIPS32, | ||
| KonanTarget.LINUX_MIPSEL32, |
There was a problem hiding this comment.
These targets were removed in Kotlin 2.0.
| KonanTarget.MINGW_X86, | ||
|
|
||
| KonanTarget.WASM32, | ||
|
|
||
| is KonanTarget.ZEPHYR -> error("$konanTarget not supported by moko-resources now") |
There was a problem hiding this comment.
These targets were removed in Kotlin 2.0.
| actual fun createStringResourceMock(): StringResource = StringResource("") | ||
| actual fun createFileResourceMock(): FileResource = FileResource("", "") | ||
| actual fun createColorResourceMock(): ColorResource = ColorResource("") | ||
| actual fun createFontResourceMock(): FontResource = FontResource("") |
There was a problem hiding this comment.
Moving this to appleMain ended up not being necessary to build, but it makes the code a little cleaner.
|
Does this PR will resolve incompatiblity with Kotlin 2.2.20-RC as well? moko-resources is not compiling with this last version. |
|
This was just for 2.2.0, and the changes were included in the latest release separately. It works for 2.2.10 for me but I don't think I've tried 2.2.20. |
Just tried and still failing. |
Same for me. Also, please note this is soon to impact more users:
I'm currently unable to build my project on iOS for that last reason. |
This does the necessary work to support Kotlin 2.2.0.