Hey folks, I have a feeling this must be a known i...
# multiplatform
n
Hey folks, I have a feeling this must be a known issue. Here’s what happens: I have a KMP project and as soon as I have built something, IDEA (or Android Studio) starts using built artifacts (jar, class files) for code highlighting and navigation in the editor. For example, it starts falsely reporting some imports as unreachable because of classes being internal (although actual build works flawlessly, meaning internal is just fine). When you cmd-click the import, it shows a decompiled version of it instead of the source code. It definitely happens with types from
commonMain
when imported in files residing in
jvmTest
. Doing
./gradlew clean
solves the problem (editor navigation starts using source code, red highlighting of imports goes away) until next build. IDEA CE 2020.3 beta or 2020.2.4, Kotlin plugin 1.4.20.
💪🏽 1
c
Mine often feels kinda glitchy. I don’t understand half of the tasks registered in gradle
s
I expect issues like this getting better with IntelliJ 2020.3.1
Mine often feels kinda glitchy. I don’t understand half of the tasks registered in gradle
Just a few examples would be really helpful for me 🙂
@Nikolay Kasyanov If you're not building a Library, then maybe switching the affected Android modules from "pure android" to "MPP with only Android target" will mitigate your issue!
n
@Sebastian Sellmair [JB] no pure Android modules, only KMM modules with Android target
s
Would you be available for a Google Meet session to show me the issue? 🙄
You can try with one of the latest 1.4.30 dev builds and see if my commit above fixed it for you!
n
sure, I’ll try 1.4.30 dev builds. Re: a Google Meet session, not likely, I guess 1.4.30 will be out faster than our legal will approve that 😂
😁 1
Thanks for chiming in!
@Sebastian Sellmair [JB] btw, where do I get EAP builds of Kotlin plugin? I know the kotlin-eap Maven repo, no idea about the IDE plugin tho.
btw, just a random user review at https://plugins.jetbrains.com/plugin/6954-kotlin
s
IIRC: For the issue I linked is no update necessary for the IDE plugin! Regarding "where to get EAP ide plugin from": This is a complicated story, since https://blog.jetbrains.com/kotlin/2020/10/new-release-cadence-for-kotlin-and-the-intellij-kotlin-plugin/
So I am not sure if there is already a build for that for 203+ and if there are any, I do not know where to get them from 🙄
n
I see, so I only need to use 1.4.30 Kotlin compiler and gradle plugin?
s
Yes!
Ooooooh wait...
Stupid me... That commit was for the IDE plugin only. I misremembered the issue.
n
No worries, got it, thanks for your help