https://kotlinlang.org logo
#compose
Title
# compose
r

ribesg

02/22/2024, 3:09 PM
How do you configure the package name for generated
Res
object in compose multiplatform?
d

Dima Avdeev

02/22/2024, 3:26 PM
Hello! For now we don't provide this ability. This package concatinated based on your project groupId: https://github.com/JetBrains/compose-multiplatform/blob/8f2fa296fe87e32ec3f022f77f[…]in/kotlin/org/jetbrains/compose/resources/ResourcesGenerator.kt
r

ribesg

02/22/2024, 3:28 PM
Oh that's unfortunate. I don't like what it does with the project name. Would there be a way to cheat by replacing the project name at the right time? 😛
t

tylerwilson

02/22/2024, 3:43 PM
I ran into an issue with this, since it varies the package name based on context of the build. That is, I have my shared code included in my Android project, so the Res ends up in app_name.library_name. But when building the library standalone or from Xcode, it is simply library_name, so any references to it break. I created an issue here, but no activity on it as yet.e
👀 1
r

ribesg

02/22/2024, 3:45 PM
Yeah it's a little wild of the plugin to just guess a value like that, I would have preferred for it to be generated without a package name until we have a configurable value
👀 1
2 Views