Upgrade to Kotlin 1.1-M04
Needed for Kotlin script and JSR 223 support, and a good target for Spring Framework 5.0 since it will allow features like generating Java 8 bytecode, JDK 9 support, annotation array attribute single value without arrayOf(), etc. We ensure Kotlin 1.0 compatibility by setting apiVersion and languageVersion compiler options to 1.0. Issue: SPR-15059
This commit is contained in:
parent
276cfd8993
commit
ef4340063e
44
build.gradle
44
build.gradle
|
|
@ -1,11 +1,12 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven { url "https://repo.spring.io/plugins-release" }
|
maven { url "https://repo.spring.io/plugins-release" }
|
||||||
|
maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
|
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
|
||||||
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
|
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.5-2"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1-M04"
|
||||||
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -69,7 +70,7 @@ configure(allprojects) { project ->
|
||||||
ext.junitVersion = "4.12"
|
ext.junitVersion = "4.12"
|
||||||
ext.junitJupiterVersion = '5.0.0-M3'
|
ext.junitJupiterVersion = '5.0.0-M3'
|
||||||
ext.junitPlatformVersion = '1.0.0-M3'
|
ext.junitPlatformVersion = '1.0.0-M3'
|
||||||
ext.kotlinVersion = "1.0.6"
|
ext.kotlinVersion = "1.1-M04" // Also change kotlin-gradle-plugin version when upgrading
|
||||||
ext.log4jVersion = '2.7'
|
ext.log4jVersion = '2.7'
|
||||||
ext.nettyVersion = "4.1.6.Final"
|
ext.nettyVersion = "4.1.6.Final"
|
||||||
ext.okhttpVersion = "2.7.5"
|
ext.okhttpVersion = "2.7.5"
|
||||||
|
|
@ -107,6 +108,15 @@ configure(allprojects) { project ->
|
||||||
apply plugin: "test-source-set-dependencies"
|
apply plugin: "test-source-set-dependencies"
|
||||||
apply from: "${gradleScriptDir}/ide.gradle"
|
apply from: "${gradleScriptDir}/ide.gradle"
|
||||||
|
|
||||||
|
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
|
||||||
|
if (!JavaVersion.current().java9Compatible) {
|
||||||
|
apply plugin: "kotlin"
|
||||||
|
compileKotlin {
|
||||||
|
kotlinOptions.apiVersion = 1.0
|
||||||
|
kotlinOptions.languageVersion = 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
sniffer
|
sniffer
|
||||||
javaApiSignature
|
javaApiSignature
|
||||||
|
|
@ -172,6 +182,7 @@ configure(allprojects) { project ->
|
||||||
repositories {
|
repositories {
|
||||||
maven { url "https://repo.spring.io/libs-release" }
|
maven { url "https://repo.spring.io/libs-release" }
|
||||||
maven { url "https://repo.spring.io/milestone" }
|
maven { url "https://repo.spring.io/milestone" }
|
||||||
|
maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
@ -325,11 +336,6 @@ project("spring-build-src") {
|
||||||
project("spring-core") {
|
project("spring-core") {
|
||||||
description = "Spring Core"
|
description = "Spring Core"
|
||||||
|
|
||||||
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
|
|
||||||
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
|
// 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
|
// both into the spring-core jar. cglib 3.2 itself depends on asm 5.x and is therefore
|
||||||
// further transformed by the JarJar task to depend on org.springframework.asm; this
|
// further transformed by the JarJar task to depend on org.springframework.asm; this
|
||||||
|
|
@ -429,11 +435,6 @@ project("spring-core") {
|
||||||
project("spring-beans") {
|
project("spring-beans") {
|
||||||
description = "Spring Beans"
|
description = "Spring Beans"
|
||||||
|
|
||||||
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
|
|
||||||
if (!JavaVersion.current().java9Compatible) {
|
|
||||||
apply plugin: "kotlin"
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":spring-core"))
|
compile(project(":spring-core"))
|
||||||
compile(files(project(":spring-core").cglibRepackJar))
|
compile(files(project(":spring-core").cglibRepackJar))
|
||||||
|
|
@ -513,10 +514,6 @@ project("spring-context") {
|
||||||
description = "Spring Context"
|
description = "Spring Context"
|
||||||
|
|
||||||
apply plugin: "groovy"
|
apply plugin: "groovy"
|
||||||
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
|
|
||||||
if (!JavaVersion.current().java9Compatible) {
|
|
||||||
apply plugin: "kotlin"
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":spring-aop"))
|
compile(project(":spring-aop"))
|
||||||
|
|
@ -585,11 +582,6 @@ project("spring-oxm") {
|
||||||
project("spring-messaging") {
|
project("spring-messaging") {
|
||||||
description = "Spring Messaging"
|
description = "Spring Messaging"
|
||||||
|
|
||||||
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
|
|
||||||
if (!JavaVersion.current().java9Compatible) {
|
|
||||||
apply plugin: "kotlin"
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":spring-beans"))
|
compile(project(":spring-beans"))
|
||||||
compile(project(":spring-core"))
|
compile(project(":spring-core"))
|
||||||
|
|
@ -730,10 +722,7 @@ project("spring-context-indexer") {
|
||||||
project("spring-web") {
|
project("spring-web") {
|
||||||
description = "Spring Web"
|
description = "Spring Web"
|
||||||
|
|
||||||
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
|
|
||||||
if (!JavaVersion.current().java9Compatible) {
|
|
||||||
apply plugin: "kotlin"
|
|
||||||
}
|
|
||||||
apply plugin: "groovy"
|
apply plugin: "groovy"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
@ -823,11 +812,6 @@ project("spring-web") {
|
||||||
project("spring-web-reactive") {
|
project("spring-web-reactive") {
|
||||||
description = "Spring Web Reactive"
|
description = "Spring Web Reactive"
|
||||||
|
|
||||||
// Kotlin compiler does not support JDK 9 yet, see https://youtrack.jetbrains.com/issue/KT-14988
|
|
||||||
if (!JavaVersion.current().java9Compatible) {
|
|
||||||
apply plugin: "kotlin"
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":spring-core"))
|
compile(project(":spring-core"))
|
||||||
compile(project(":spring-web"))
|
compile(project(":spring-web"))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue