From 54b8aab1c600f697b1de59df7f0400fdf1d076cd Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 23 Dec 2016 18:45:51 +0100 Subject: [PATCH] Kotlin plugin conditionally deactivated on JDK 9 --- build.gradle | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index c25e884fa90..e738f813c0e 100644 --- a/build.gradle +++ b/build.gradle @@ -326,8 +326,10 @@ project("spring-build-src") { project("spring-core") { description = "Spring Core" - // Disabled since Kotlin compiler does not support JDK 9 yet - //apply plugin: "kotlin" + // Kotlin compiler does not support JDK 9 yet + if (!JavaVersion.current().java9Compatible) { + apply plugin: "kotlin" + } // As of Spring 4.0.3, spring-core includes asm 5.x and repackages cglib 3.2, inlining // both into the spring-core jar. cglib 3.2 itself depends on asm 5.x and is therefore @@ -428,8 +430,10 @@ project("spring-core") { project("spring-beans") { description = "Spring Beans" - // Disabled since Kotlin compiler does not support JDK 9 yet - //apply plugin: "kotlin" + // Kotlin compiler does not support JDK 9 yet + if (!JavaVersion.current().java9Compatible) { + apply plugin: "kotlin" + } dependencies { compile(project(":spring-core")) @@ -455,7 +459,7 @@ project("spring-beans-groovy") { } // this module's Java and Groovy sources need to be compiled together - compileJava.enabled=false + compileJava.enabled = false sourceSets { main { groovy { @@ -577,8 +581,10 @@ project("spring-oxm") { project("spring-messaging") { description = "Spring Messaging" - // Disabled since Kotlin compiler does not support JDK 9 yet - //apply plugin: "kotlin" + // Kotlin compiler does not support JDK 9 yet + if (!JavaVersion.current().java9Compatible) { + apply plugin: "kotlin" + } dependencies { compile(project(":spring-beans")) @@ -720,9 +726,11 @@ project("spring-context-indexer") { project("spring-web") { description = "Spring Web" + // Kotlin compiler does not support JDK 9 yet + if (!JavaVersion.current().java9Compatible) { + apply plugin: "kotlin" + } apply plugin: "groovy" - // Disabled since Kotlin compiler does not support JDK 9 yet - //apply plugin: "kotlin" dependencies { compile(project(":spring-aop")) // for JaxWsPortProxyFactoryBean @@ -811,8 +819,10 @@ project("spring-web") { project("spring-web-reactive") { description = "Spring Web Reactive" - // Disabled since Kotlin compiler does not support JDK 9 yet - //apply plugin: "kotlin" + // Kotlin compiler does not support JDK 9 yet + if (!JavaVersion.current().java9Compatible) { + apply plugin: "kotlin" + } dependencies { compile(project(":spring-core"))