-
Notifications
You must be signed in to change notification settings - Fork 568
How can I setup kotlin-native with intellij #474
Comments
We use intellij gradle integration in development. you can try yourself import gradle project from our samples. This the only method known for today, later IDE will support kotlin naive more natively and smooth. |
I can import the sample, but how to setup kotlin-native libs and autocomplete ? |
you can create similar gradle build script for your project and bindings to your library appears in your idea project immediately after cinteropt phase of build completed. |
😳 |
here you can find fork of public kotlin-native project enriched with gradle build (it macish at this stage, but enough to illustrate how to modify for your platform) |
if you need more assistance please fill free to reopen issue |
I try to compile the latest but got this
|
@vvlevchenko Finally I compiled konan-sfml, but still can not run this
|
The typeOf problem was recently fixed, IIRC. Also commercial IDE for Kotlin/Native is being considered. |
@vvlevchenko Added macOS support in original repo perses-games/konan-sfml#1 I was looking for sfml lib, thanks for mentioning it :D :D kotlin is the best language ever, thanks for your hard work <3 |
@wenerme To work around the typeOf issue, I used the command line build (see: konan-sfml). To have autocomplete in intellij I created a kotlin jvm project and added the Runtime.jar to the dependencies and the interop kotlin files to the sources (don't link the gradle build file). And then I build with the build script, this works for me. I'll switch to gradle once the typeOf issue is fixed there. |
@perses-games Can't seem to get autocomplete to work for generated koltin. I don't know what I'm doing wrong.Can you describe the steps taken to import kotlin native samples? |
@olonho Will there be an IntelliJ community plugin for koltin native? (it might seem selfish) Because they only work I do with IntelliJ IDE would be to build some OSS for elementary os using gtk bindings. |
As @harisvsulaiman has mentioned above some major Linux distros (eg Linux Mint) may want to use Kotlin Native to develop supporting GUI tools/utilities. If IntelliJ Community edition doesn't support Kotlin Native then that is likely to put in a barrier (show stopper), which prevents Linux distros from using Kotlin Native (think licensing issues with tooling).
|
@harisvsulaiman I added the generated file as a source file in the project settings in intellij. If you take a look at the settings in the sfml example project (https://github.com/perses-games/konan-sfml) you will see that the sfml.kt file is added to the project as a source file. |
Thank you. Hopefully, I'll get it working. 😉
|
I also hope there will be a plugin for IDEA or CLion for people who don't need the whole multiplatform thing and just want to develop with kotlin native, similar to the Rust/Swift one just basic stuff |
@Scellow - Hopefully if a IntelliJ plugin is produced then it can be used in the Community edition, not just the Ultimate edition. Somehow I think if some of the major Linux distros are involved with Kotlin Native then they WILL want Kotlin Native support in IntelliJ Community edition. |
Is it possible to setup kn with intellij, or how you gays write kotlin native, without ide support ?
The text was updated successfully, but these errors were encountered: