Configure IntelliJ auto-completion for gradle script in kotlin

后端 未结 3 802
长情又很酷
长情又很酷 2021-01-03 20:49

I am trying out gradle-script-kotlin with simple hello-world application in IntelliJ. But IntelliJ auto-completion doesn\'t popup in

3条回答
  •  别那么骄傲
    2021-01-03 21:23

    Had the same problem. Gradle script Kotlin requires version 1.1x of the IntelliJ Kotlin plugin.

    Follow these steps to install it:
    https://github.com/gradle/gradle-script-kotlin/tree/master/samples#install-idea-kotlin-plugin

    The regular update channel only updates to version 1.0.3x right now.

    Update 18/06:
    The github readme has been updated to include:
    (Note: this version will not work with the official Gradle 3.0 release, stick to the official EAP 1.1 from JetBrains if you intend to use Gradle 3.0)

    If you manually installed version 1.1.0-dev-2222 earlier, uninstall it and restart IntelliJ.

    Install version 1.1.x from the EAP Channel

    This version works with Kotlin-Script in Gradle 3.0.

    In IntelliJ, press:
    Tools => Kotlin => Configure Kotlin Updates.
    Select
    Early Access Preview 1.1
    and press
    Check for updates now.

    Download the latest plugin.
    If it gives an error, just restart IntelliJ, it will have installed the plugin.

提交回复
热议问题