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.
This commit is contained in:
Sam Brannen
2019-04-08 17:05:08 +02:00
parent bd414df944
commit 9a93615ec4

View File

@@ -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"