CLion and Kotlin/Native 1.3


#1

To ensure people who are focusing on pure native development feel good, along with the native support for MPP in Kotlin 1.3 we are happy to release Kotlin/Native support in the CLion IDE . Plugin can be installed into CLion 2018.3 EAP (183.4139), and allows to work with projects described using multiplatform Gradle DSL. Kotlin/Native samples were converted to MPP format, and can be opened in the CLion. Unfortunately, Groovy support is not included in CLion, so editing Gradle build files with the proper highlighting is not yet possible, but we are working on improving the situation here.


#2

:tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada:

any idea why cinterop and kotlinx.coroutines are unresolved by code insight?

…along with other things like unsigned number types


#3

What project are you checking? With samples referred above it is known to work.


#4

I am using a nativeCommonMain which macMain and windowsMain depend on. nativeCommonMain depends on commonMain.

(Even though it is implicit)
Adding

dependsOn commonMain

to nativeCommonMain fixes kotlinx.coroutines and unsigned type resolution by code insight

But the issue with cinterop being unresolved still exists. (I am guessing because nativeCommonMain isn’t recognized as a source set which holds native code by the plugin?

The only way I’ve figured out how to get cinterop to be resolved by code insight is if macMain and windowsMain source sets directly depend on commonMain sourceSet


#5

Should debugging work on windows?
If yes - what toolchain should be used?

With this settings - I can stop on breakpoints and step, but cannot inspect variables.


#6

Well, low-level inspecting in GDB works:


#7

If in debugger settings uncheck “Hide out-of-scope variables” - it shows variables, but non-primitive - as pointer:


#8

Any updates on when MPP/the Kotlin Native Gradle Plugin will support the Gradle Kotlin DSL?


#9

Unfortunately, not at the moment.


#10

OK, thanks! Keep up the good work :slight_smile: