`android.util.*` and `java.util.*` in commonMain?
# multiplatform
p
android.util.*
and
java.util.*
in commonMain?
I'm in the middle of converting a project to KMM, and I've noticed that I can compile/build some files with certain android/java dependencies, even though I haven't moved them out of the commonMain source into androidMain. I'm confused why I'm not getting compiler errors for these.
e
do you have any non-Android targets configured?
if commonMain is only used by
android()
, then I believe it's expected behavior that Java and Android classes are available
b
I've noticed this bug as well. It will compile fine with those imports, but when I try to run my web target it will fail due to the missing java.util.* classes.
I would expect the compiler to be stricter about what's allowed in commonMain.
p
it's only used by android() as I've only been compiling for Android, but I do have ios targets defined as well. Code inspection complains about the issues, but I need to manually open every file for it to see any errors
it would really be nice to enable a strict mode