then when creating a JAR both files will compile to
MyUtilsKt.class
, so they will clash. Renaming them to
MyUtils.jvm.kt
and
MyUtils.common.kt
will avoid this problem.
m
Marko Novaković
07/06/2023, 9:03 AM
thanks
l
Landry Norris
07/06/2023, 2:13 PM
It also makes it more clear which platform is which in the IDE tabs. Depending on project structure, it doesn't always show the *Main path, so you have to guess which MyUtils.kt is which. By adding the suffix, it's immediately obvious.