JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.87k stars 1.15k forks source link

Compose-Multiplatform Resources for ios doesn't work with Moko-Resources #4513

Closed ExNDY closed 5 months ago

ExNDY commented 5 months ago

Describe the bug Moko-Resources plugin in incompitable list of plugins inside Compose-Multiplatform plugin: https://github.com/JetBrains/compose-multiplatform/blob/master/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ios/configureSyncIosResources.kt#L29

What should we change in our plugin to remove it from the incompatible list? Or you need check latest version (0.24.0 work in progress) with your developments?

Affected platforms

Versions

Expected behavior Compose-Multiplatform Resources plugin work with Moko-Resources inside project without disable resource-manager for IOS platform

ExNDY commented 5 months ago

@terrakok Hi, i'm write you about this question.

pjBooms commented 5 months ago

Duplicate to https://github.com/JetBrains/compose-multiplatform/issues/4499. @AlexeyTsvetkov please remind the context of the issue.

jbruchanov commented 5 months ago

I'd add to this as well.. Please don't make the resources breaking other implementations. I've done my own implementation as well to have all the useful features like locale/display qualifiers/plurals etc, and it'd be just the best if the resources became a simple opt-in extension and not something what is breaking other libs, or something what is forcibly disabling other libs from the usage...

terrakok commented 5 months ago

The compose gradle plugin does a resource packaging for iOS targets as part of its final artifacts build. The plugin has a logic how to get target resources and to copy them to a resource's bundle. Sorry, we don't provide a public API here and don't give guaranies for other plugins (like a bundle name, an inner structure or tasks names). So, if you create 3d party plugin for resources you are suppose to implement its own resource bundle packaging logic and to copy the custom bundle to the final application.

We plan to delete the restrictions for other plugins on our side but it doesn't mean we supported them. It is responsibility the plugins authors.

P.S.: there is a drawback, the compose gradle plugin packs all target's resources to the compose resources bundle (not only from composeResources directory). We may change it in a future. No guaranties here. That is why you are suppose to implement own bundle here.

terrakok commented 5 months ago

The restrictions were deleted in the master

okushnikov commented 1 month ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.