Hello, I was trying to migrate from `moko-resource...
# multiplatform
e
Hello, I was trying to migrate from
moko-resources
to the new
composeResources
and I will leave here my first experiences and problems: • The first problem is the multi-module issue that Jetbrains is already working on, the Resources are only available in
shared
module. As I still need to use the resources in other modules, this was my first barrier. • There are some languages available in
android
and
moko-resources
that are not valid with
composeResources
. I found for example the case of
Asturian
(values-ast). Adding this directory, the application does not compile. • Some Android libraries, needs the
resourceId
to work, I am using them in the
actual
implementation for
android
and I am not able to get it with the new approach. • It is not possible to have several
string
files, inside
values
you can have only
strings.xml
but you can not other string files with different names (I was doing that with
moko
and in
android
so I can divide the strings by topics). • After adding few languages, I started to have an issue related with
MethodTooLargeException
that I was not able to fix. • I could not find a function
getDrawable
similar to the existing
getString
that can be accessed by non-composable code. • I was not able to run the application on iOS due to a
MissingResourceException
. After all of this problems, I decided to continue using
moko
for now. I understand that some of these problems can be my problems and not everybody will have them, however, it is a big step and I am very thankful to Jetbrains guys for the effort, but for now I am unable to use the new
composeResources
. Hopefully it will be more complete in the future.
👍 5
👌 4
👀 1
d
oh, i was thinking to maybe migrate also. Thank you, won't be doing that now 😅 Also, there is no need to have a dependency on compose for resources, moko allows using them natively also as far as a I know
k
Hi! Thank you for the feedback! 1. the multi-module is in a progress 2. bug! will fix it 3. yes. this is not android resources, so the case won't work 4. you are right. it is the current limitation 5. it was fixed in rc03 6. it is in the backlog 7. need a reproducer please! make issues in the Github. it is not good to share problems only here 🙏
👍 2
e
Thank you for your answer. You are right, next tie I will open issues on Github 👍 @Konstantin Tskhovrebov
m
I actually did the migration last month and of course, it came with a few headaches. That
MissingResourceException
was particularly annoying on iOS, but I read somewhere about some incompatibility between
composeResources
and
mokoResources
and getting rid of the latter completely from my project stopped that from happening.
e
@Konstantin Tskhovrebov I'm also dealing with the
MissingResourceException
, I read you stated that multi-module is still not supported. To my surprise, I have 2 projects in one it actually works in a module other than the shared one, and in another project only works in the shared module, here are the reproducers: 1. Working in both shared and signin module: Drive .zip 2. Only working in the composeApp module: Github branch I'm wondering if multi-module is not supported, how is it working on project 1. I don't remember doing anything special, both are projects created in Android Studio with the KMM Plugin, can you take a look for me, please?