From 9a93615ec49c2c718c8edc7bad5aa49e0a5604ba Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 8 Apr 2019 17:05:08 +0200 Subject: [PATCH] Configure Kotlin plugin support for Eclipse in Gradle build This commit configures the Kotlin plugin for Eclipse in the spring-core-coroutines Gradle project so that users no longer have to manually "Configure Kotlin / Add Kotlin Nature" within the Eclipse IDE after importing projects. This change is currently limited to the spring-core-coroutines project since it is the only project in which Java code depends on compiled Kotlin code; however, this change may later be applied to additional projects if desirable. --- spring-core-coroutines/spring-core-coroutines.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spring-core-coroutines/spring-core-coroutines.gradle b/spring-core-coroutines/spring-core-coroutines.gradle index 1bff7afbfb..b9862340d2 100644 --- a/spring-core-coroutines/spring-core-coroutines.gradle +++ b/spring-core-coroutines/spring-core-coroutines.gradle @@ -7,3 +7,13 @@ dependencies { compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}") compile("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:${coroutinesVersion}") } + +eclipse.project { + buildCommand "org.jetbrains.kotlin.ui.kotlinBuilder" + buildCommand "org.eclipse.jdt.core.javabuilder" + natures "org.jetbrains.kotlin.core.kotlinNature" + natures "org.eclipse.jdt.core.javanature" + linkedResource name: "kotlin_bin", type: "2", locationUri: "org.jetbrains.kotlin.core.filesystem:/" + project.name + "/kotlin_bin" +} + +eclipse.classpath.containers "org.jetbrains.kotlin.core.KOTLIN_CONTAINER"