Hello With new change introduce in <0.27.1> how ca...
# moko
f
Hello With new change introduce in 0.27.1 how can we still continue using the custom class name ? previous I had something like this:
Copy code
import my.app.module1.Module1MR

var text = Module1MR.strings.customTitle
and this worked fine. But with the bump to 0.27.1 the imports are different. I need to do a full import of the string(s)
Copy code
import my.app.module1.customTitle
If I have multiple strings I would need all the imports since I don’t want to use wildcard. Is there any other option? cc @alex009
a
@Konstantin Kolchurin help please
k
Hello! Under Kotlin’s import rules, importing an object does not import its extensions. Without wildcard imports, each extension property you use needs an explicit import. You can still use
Module1MR.strings.customTitle
, but importing only
Module1MR
is no longer enough. This approach fixes JVM bytecode-limit errors in projects with large resource collections. Moving everything back into objects would bring those problems back, so we have no plans to do that. We would only reconsider this approach if Kotlin’s import rules or compilation model change to allow fewer imports without reintroducing those limits.
f
Thanks