Search code examples
eclipsegradlebuild.gradlegradle-plugingradle-kotlin-dsl

How do I create an Eclipse project using the Gradle Kotlin DSL?


How can I get the same result from Eclipse as I would from the console with gradle init --type java-application --test-framework testng --dsl kotlin?

I'm seeing the wizard:

wizard1

but no gradle-kotlin-dsl option:

wizard2

I'm new to Eclipse, but have both Gradle and Kotlin plugins installed. However, I now see that's of little utility:

Kotlin DSL is fully supported in Intellij IDEA and Android Studio. Other IDEs, such as Eclipse or NetBeans, do not yet provide helpful tools for editing Gradle Kotlin DSL files, however, importing and working with Kotlin DSL-based builds work as usual.

Given that Eclipse doesn't fully support the Kotlin DSL, as I'd hoped, I'll probably try IDEA for now.


Solution

  • The Gradle Kotlin DSL does not seem currently supported.

    See Buildship issue #222 comment by Donát Csikós:

    Not really. The existing Kotlin integration in Eclipse is simply too unstable to work with Gradle DSL. We'll coordinate with JetBrains how can we improve the situation. I'll close this issue for the time being and reopen when we have an update.