https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
u

Umesh Gupta

11/16/2023, 2:44 PM
Issue with IOS resources, from multi-module. Not able to use resources in module other than shared In IOS. Any thing in other module's resource folder (vector or ttf).
Copy code
org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: info-icon.xml
I know there is something with build.gradle. Any one faced this issue and able to resolve it.
Copy code
val commonMain by getting {
            dependencies {
                resources.srcDirs("resources")
                api(compose.runtime)
                api(project(":xyz"))
           }}
There is no POD install and doesn't require as of now. Thanks for the help.
Only able to see shared resources as
compose-resources
in build folder. Non from submodule/project
n

Nikita Lipsky

11/17/2023, 3:52 PM
Multi-module resources are not supported yet. It will be addressed in the next CMP releases
u

Umesh Gupta

11/18/2023, 7:30 PM
@Nikita Lipsky thanks for sharing. Where can I see the roadmap? Also, can you share some lights on how can I achieve this via Gradle?
Fixed : By just adding below in shared build.gradle
Copy code
val commonMain by getting {resources.srcDirs("${project(":projectName").projectDir}/src/commonMain/resources")}
j

Jan Skrasek

11/21/2023, 5:16 PM
Multi-module resources are not supported yet. It will be addressed in the next CMP releases
Is there a ticket I could follow please?
n

Nikita Lipsky

11/22/2023, 10:25 AM
Support of multi-module resources requires support from core Kotlin. Once an API for Kotlin Multiplatform resources appears we may base on it and add required support in Compose Multiplatform. We are working on it right now with Kotlin team. You may follow this issue: https://youtrack.jetbrains.com/issue/KT-49981/Multiplatform-API-to-access-library-and-application-resources
thank you color 2
2 Views