Do folks here prefer using IntelliJ IDEA for writi...
# kotlin-native
s
Do folks here prefer using IntelliJ IDEA for writing Kotlin Native over Android Studio?
g
Yes. For example K/N debugging plugin available only on Idea Ultimate. CLion is one more IDE suitable much more than AS
s
The debugger would be a good usecase but it seems like the plugin is a bit limited right now. It throws an error if I try evaluating expressions containing stdlib functions (which are almost everywhere in my code). Does it work for your project?
message has been deleted
I wonder if it's related to inline functions.
s
The debug plugin is currently somewhat incompatible with the normal Kotlin plugin. That aside, I use IntelliJ almost exclusively anyway, so might as well use it for K/N as well
g
Yes, it’s experimental. but anyway, it will never be available on AS, also Idea has newer version of Idea platform than AS. At some point of course possible to use AS, but I just don’t see reasons for this
n
Not every Kotliner uses Kotlin Native to target Android. There are significantly more Kotliners that target Linux (biggest Kotlin Native target at 74%) than Android (second largest Kotlin Native target at 48%). Can find the results in the 2019 Kotlin survey done by JB: https://www.jetbrains.com/lp/devecosystem-2019/kotlin/
🤔 1
This is one of the major reasons why there are more Kotliners using IntelliJ for Kotlin Native development than Android Studio.
k
I use Intellij mostly. I don’t do a lot of UI at this point, so if you’re actively building screens, AS may be better. In general we set up projects so that you can open them in either AS or Intellij. Native debugging for kotlin is still in xcode, generally, but haven’t really tried the Intellij native debugger. As for what platform to target, I’m going to guess that survey needs a refresh. It’s difficult to believe more people target native Android with KN than iOS code sharing, but maybe I’m super out of touch 🙂
n
That survey doesn't cover Kotlin MPP per say. The Kotlin census 2018 does through (look for the Multiplatform Projects section): https://www.jetbrains.com/research/kotlin-census-2018/
a
In my company we are using Android Studio because we are all Android developers working on Android native projects. And recently we started introducing MPP modules. We are not going to switch to Intellij. Even more, AS specific bugs and tooling limitations are blockers for MPP expansion for us.
k
@napperley Kotlin Native specific is there
I suspect a fair number of answers were thinking what platform they code on, and some included Android because KMP was also targeting Android. It just seems like 74% targeting Linux is high.
g
recently we started introducing MPP modules
@Arkadii Ivanov For MPP it’s definitely make sense if one of platforms is Android, but question was about Kotlin Native, isn’t it. And K/N looks for me as very different case
👍 1
a
@gildor K/N is part of MPP and I thought that limitations in K/N are also applicable for MPP.
g
K/N for sure is part of MPP, but not every MPP has K/N, also AS is really bad if you want to work with iOS: ObjC, debugging nothing is working. Also JS and any other web technologies are not supported, which is also part of MPP For JVM/Android of course is fine, but than you probably need another IDE for other platforms
1