Hi everyone, I am using compose resources in a mod...
# compose
v
Hi everyone, I am using compose resources in a module
:ui:resources
which exposes compose resources as a transitive dependency Now in the module where im consuming
:ui:resources
module, i am able to access the
Res
class, but i am not able to access any functions/classes from compose Resources functions like
painterResource(.....)
,
DrawableResource
are not accessible
:ui:resources
gradle file
Copy code
sourceSets {
    commonMain.dependencies {
        api(compose.components.resources)
    }
}
consumer module
Copy code
commonMain.dependencies {
    implementation(projects.ui.resources)
}
This is only happening for compose Resources, all my other transitive dependencies work fine
t
Copy code
compose.resources {
    publicResClass = true
    packageOfResClass = "X.X.X"
}
do you have declared this in
:ui:resources
?
v
Yes
t
make sure you use
org.jetbrains.compose.resources.*
functions when loading resources and not the androidx ones
v
I have the exact same structure in a different project of mine, and it works fine there the only difference is, that working project uses
com.android.library
gradle plugin and my current one in which its not working uses the
com.android.kotlin.multiplatform.library
plugin
t
i'm also using
com.android.library
plugin.
parcelize
plugin doesn't like the new gradle plugin unfortunately
v
A lot of things dont work correctly with the new plugin, kotest tests also dont run when using that new plugin