Generate Java 8 bytecode with Kotlin compiler
This commit also updates Kotlin from beta 2 to RC. Issue: SPR-15183
This commit is contained in:
parent
4d48fde795
commit
692e432f0b
24
build.gradle
24
build.gradle
|
|
@ -6,7 +6,7 @@ buildscript {
|
|||
dependencies {
|
||||
classpath("io.spring.gradle:propdeps-plugin:0.0.8")
|
||||
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0-beta-38")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.0-rc-91")
|
||||
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
||||
classpath("io.spring.gradle:dependency-management-plugin:1.0.0.BUILD-SNAPSHOT")
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ configure(allprojects) { project ->
|
|||
ext.junitVersion = "4.12"
|
||||
ext.junitJupiterVersion = '5.0.0-M3'
|
||||
ext.junitPlatformVersion = '1.0.0-M3'
|
||||
ext.kotlinVersion = "1.1.0-beta-38" // also change kotlin-gradle-plugin version when upgrading
|
||||
ext.kotlinVersion = "1.1.0-rc-91" // also change kotlin-gradle-plugin version when upgrading
|
||||
ext.log4jVersion = '2.8'
|
||||
ext.nettyVersion = "4.1.8.Final"
|
||||
ext.okhttpVersion = "2.7.5"
|
||||
|
|
@ -110,6 +110,12 @@ configure(allprojects) { project ->
|
|||
// 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.jvmTarget = "1.8"
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
|
@ -403,7 +409,7 @@ project("spring-core") {
|
|||
optional("net.sf.jopt-simple:jopt-simple:5.0.3")
|
||||
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
optional("org.reactivestreams:reactive-streams")
|
||||
optional("io.projectreactor:reactor-core")
|
||||
optional "io.reactivex:rxjava:${rxjavaVersion}"
|
||||
|
|
@ -441,7 +447,7 @@ project("spring-beans") {
|
|||
compile(files(project(":spring-core").cglibRepackJar))
|
||||
optional("javax.inject:javax.inject:1")
|
||||
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
optional("org.yaml:snakeyaml:${snakeyamlVersion}")
|
||||
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
|
||||
}
|
||||
|
|
@ -536,7 +542,7 @@ project("spring-context") {
|
|||
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
|
||||
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
|
||||
optional("org.beanshell:bsh:2.0b5")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
testCompile("org.apache.commons:commons-pool2:2.4.2")
|
||||
testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
|
||||
testCompile("javax.inject:javax.inject-tck:1")
|
||||
|
|
@ -614,7 +620,7 @@ project("spring-messaging") {
|
|||
testCompile("org.xmlunit:xmlunit-matchers:${xmlunitVersion}")
|
||||
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
|
||||
testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||
testCompile("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
testCompile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
testRuntime("javax.activation:activation:${activationApiVersion}")
|
||||
testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
|
||||
testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
|
||||
|
|
@ -678,7 +684,7 @@ project("spring-jdbc") {
|
|||
optional("org.apache.derby:derby:10.13.1.1")
|
||||
optional("org.apache.derby:derbyclient:10.13.1.1")
|
||||
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -780,7 +786,7 @@ project("spring-web") {
|
|||
optional("javax.xml.bind:jaxb-api:${jaxbVersion}")
|
||||
optional("javax.xml.ws:jaxws-api:${jaxwsVersion}")
|
||||
optional("javax.mail:javax.mail-api:${javamailVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
testCompile(project(":spring-context-support")) // for JafMediaTypeFactory
|
||||
testCompile("io.projectreactor.addons:reactor-test")
|
||||
testCompile("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
|
||||
|
|
@ -843,7 +849,7 @@ project("spring-webflux") {
|
|||
exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec"
|
||||
}
|
||||
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
|
||||
testCompile("io.projectreactor.addons:reactor-test")
|
||||
testCompile("javax.validation:validation-api:${beanvalVersion}")
|
||||
testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue