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
ephemient
04/02/2024, 5:37 PM
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)
ephemient
04/02/2024, 5:38 PM
eg if you have a Main.kt in both common and desktop but not android source set then you would get those symptoms
r
rob42
04/02/2024, 5:38 PM
I have no other main.kt files in the multiplatform module