Is "Main.kt" special cased at all? I'm experiencin...
# multiplatform
r
Is "Main.kt" special cased at all? I'm experiencing magic behaviour. I have a multiplatform module (imported by desktop and android). Any functions defined in
mymodule/src/commonMain/kotlin/Main.kt
become an "Unresolved reference" when called from my compose desktop target, but not when called from android. This has sent me on a wild goose chase until I realised that if I name the file anything else, the functions are importable.
e
it is not special but if you have another file with the same name (that isn't renamed with
@file:JvmName
), only one will be visible on JVM (and Android)
eg if you have a Main.kt in both common and desktop but not android source set then you would get those symptoms
r
I have no other main.kt files in the multiplatform module
But I do in the compose app module
e
that'll do
r
Oh man, thanks for clarifying
e
use different packages for different modules
r
ahh, make sense. thank you!