Can I share this code between Android + Desktop so...
# compose-desktop
c
Can I share this code between Android + Desktop somehow?
Copy code
private val Rubik =
    FontFamily(
        Font(R.font.rubik_regular, FontWeight.Normal),
        Font(R.font.rubik_bold, FontWeight.Bold),
        Font(R.font.rubik_medium, FontWeight.Medium))
or do I have to do some sort of expect/actual thing here?
i
Only expect/actual. Example: common android desktop
m
Would using moko-resources be an option for you? https://github.com/icerockdev/moko-resources#example-8---pass-font
c
@Igor Demin thanks for clarifying. @Michael Paus does moko work on desktop though?
m
I haven’t used it myself yet but the readme mentions desktop and also this article https://www.linkedin.com/pulse/sharing-resources-kotlin-multiplatform-moko-resources-isuru-rajapakse?trk=articles_directory
👍 1
The groupId is dev.icerock.moko and the artifactId is resources-compose-jvm
👍 1
c
Thanks. Had issues getting it setup. Will just try igors approach for now as its not critical.