Is Moko resources compatible with the newer <Andro...
# moko
p
Is Moko resources compatible with the newer Android-KMP library plugin? Can't see a sample project in the repo or mention of it anywhere I'm attempting to migrate an Android and iOS project which uses Moko in a KMP shared module and am running into a host of build errors 🧵
Copy code
> Task :shared:compileAndroidMain FAILED
e: path/shared/build/generated/moko-resources/androidMain/src/com/my/bundle/shared/Res.kt:19:33 Too many arguments for 'constructor(): ResourcePlatformDetails'.
e: path/shared/build/generated/moko-resources/androidMain/src/com/my/bundle/shared/Res.kt:24:24 No parameter with name 'resourcesClassLoader' found.
e: path/shared/build/generated/moko-resources/androidMain/src/com/my/bundle/shared/Res.kt:24:65 Unresolved reference 'resourcesClassLoader'.
e: path/shared/build/generated/moko-resources/androidMain/src/com/my/bundle/shared/Res.kt:24:87 No parameter with name 'bundleName' found.
e: path/shared/build/generated/moko-resources/androidMain/src/com/my/bundle/shared/Res.kt:24:115 No parameter with name 'key' found.
e: path/shared/build/generated/moko-resources/androidMain/src/com/my/bundle/shared/Res.kt:24:115 No value passed for parameter 'resourceId'.
e: path/shared/build/generated/moko-resources/androidMain/src/com/my/bundle/shared/Res.kt:27:24 No parameter with name 'resourcesClassLoader' found.
...
a
hello. this plugin not tested yet. if you see issues with this plugin usage then create issue in moko-resources repo. in this case we should analyze case and add support
error looks like generated code is JVM but used with android runtime library. looks like this android plugin do significant different configuration for project compared with com.android.library
p
Sure, I'll raise an issue. Yep, I think it's a fairly significant change under the hood with this newer plugin but is the direction that KMP projects need to move I think given that the regular library won't be supported going forward.