https://kotlinlang.org logo
#moko
Title
# moko
a

alex009

10/23/2023, 3:10 AM
update about resources and kotlin 1.9.0. rework still in progress, but you can use 0.23.0 with kotlin 1.9 (we use it with and without compose in our projects). https://gitlab.icerockdev.com/scl/boilerplate/mobile-moko-boilerplate here template without compose. maybe it will be helpful
👍 5
also, here config from our project with compose-multiplatform 1.5.3 https://gist.github.com/Alex009/a0e4a8af06d063fca78fa48ae440f66f
v

Vlad

10/26/2023, 12:25 PM
Could you also add your gradle version from the gradle-wrapper.props. I am migrating my project from 1.8 kotlin and 1.4 compose to 1.9 and 1.5, having struggles which doesn't really point me into correct direction, whether it is moko or not
Has anyone managed to make it work? Feels like I did everything but still stuck with the
Expected object 'MR' has no actual declaration in module <shared_xxDebug> for JVM
. Although I commented out the
tasks.withType<DummyFrameworkTask>().configureEach
part from the shared build.gradle
a

alex009

10/27/2023, 11:07 AM
https://kotlinlang.slack.com/archives/CMC5LN42W/p1698334872643319?thread_ts=1698030611.127069&amp;cid=CMC5LN42W at now this project from this config delivered only for android and ios, so maybe (i not check) desktop and web not works now
v

Vlad

10/27/2023, 11:10 AM
Can't not make it run yet for android. Maybe missing something. Although my current gradle wrapper in different version (8.2.1).
a

alex009

10/27/2023, 11:12 AM
try to add in
androidMain
sourceset explicit dependency to
commonMain
. or add sourcedir like here https://gitlab.icerockdev.com/scl/boilerplate/mobile-moko-boilerplate/-/blob/master/mpp-library/build.gradle.kts#L146
v

Vlad

10/27/2023, 1:08 PM
That line helped. Thank you. You don't have it in the attached gist. I managed to run the app with Moko-res and with those:
Copy code
kotlin.version=1.9.10
agp.version=8.0.2
compose.version=1.5.3
u

Umesh Gupta

11/01/2023, 1:00 PM
When can we expect this to get release @alex009 ?
s

Sam

11/19/2023, 2:20 PM
Hey all, I've just updated to kotlin
1.9.20
and Moko Resources
0.23.0
and it all seems to just work? I've not had to apply any of the work arounds mentioned in various issue threads for iOS and only the following snippet for android. I'm only using Moko resources for strings. Is this expected or am I going to run into unexpected subtle issues?
Copy code
// hack for problem:
    // "Expected object 'MR' has no actual declaration in module <mpp-library_debug> for JVM"
    // Issue: <https://github.com/icerockdev/moko-resources/issues/510>
    // Remove after fix this
    sourceSets {
        getByName("main").java.srcDirs("build/generated/moko/androidMain/src")
    }
12 Views