Revert "Upgrade to Kotlin 1.4 M2"
This reverts commit 2a74eff10f
.
Some regressions require to wait at least Kotlin 1.4 M3.
This commit is contained in:
parent
6615e9c5ef
commit
6b355df903
15
build.gradle
15
build.gradle
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.4-M2' apply false
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.3.72' apply false
|
||||
id 'org.jetbrains.dokka' version '0.10.1' apply false
|
||||
id 'org.asciidoctor.jvm.convert' version '2.4.0'
|
||||
id 'io.spring.nohttp' version '0.0.5.RELEASE'
|
||||
|
@ -29,8 +29,8 @@ configure(allprojects) { project ->
|
|||
mavenBom "io.r2dbc:r2dbc-bom:Arabba-SR5"
|
||||
mavenBom "io.rsocket:rsocket-bom:1.0.1"
|
||||
mavenBom "org.eclipse.jetty:jetty-bom:9.4.30.v20200611"
|
||||
mavenBom "org.jetbrains.kotlin:kotlin-bom:1.4-M2"
|
||||
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.7-1.4-M2"
|
||||
mavenBom "org.jetbrains.kotlin:kotlin-bom:1.3.72"
|
||||
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.3.7"
|
||||
mavenBom "org.junit:junit-bom:5.6.2"
|
||||
}
|
||||
dependencies {
|
||||
|
@ -286,8 +286,6 @@ configure(allprojects) { project ->
|
|||
mavenCentral()
|
||||
maven { url "https://repo.spring.io/libs-spring-framework-build" }
|
||||
maven { url "https://repo.spring.io/snapshot" } // Reactor
|
||||
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } // Kotlin
|
||||
maven { url "https://kotlin.bintray.com/kotlinx" } // Coroutines
|
||||
}
|
||||
}
|
||||
configurations.all {
|
||||
|
@ -310,16 +308,9 @@ configure([rootProject] + javaProjects) { project ->
|
|||
|
||||
pluginManager.withPlugin("kotlin") {
|
||||
apply plugin: "org.jetbrains.dokka"
|
||||
// Workaround for https://youtrack.jetbrains.com/issue/KT-39610
|
||||
configurations["kotlinCompilerPluginClasspath"].attributes.attribute(
|
||||
org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE,
|
||||
objects.named(Usage.class, "java-runtime")
|
||||
)
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
languageVersion = "1.3"
|
||||
apiVersion = "1.3"
|
||||
freeCompilerArgs = ["-Xjsr305=strict"]
|
||||
allWarningsAsErrors = true
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ pluginManagement {
|
|||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven { url 'https://repo.spring.io/plugins-release' }
|
||||
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" } // Kotlin
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors
|
||||
* Copyright 2002-2019 the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -53,7 +53,7 @@ class JdbcOperationsExtensionsTests {
|
|||
@Test // gh-22682
|
||||
fun `queryForObject with nullable RowMapper-like function`() {
|
||||
every { template.queryForObject(sql, any<RowMapper<Int>>(), 3) } returns null
|
||||
assertThat(template.queryForObject<Int?>(sql, 3) { _, _ -> null }).isNull()
|
||||
assertThat(template.queryForObject(sql, 3) { _, _ -> null as Int? }).isNull()
|
||||
verify { template.queryForObject(eq(sql), any<RowMapper<Int?>>(), eq(3)) }
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ class JdbcOperationsExtensionsTests {
|
|||
|
||||
@Test
|
||||
fun `query with RowMapper-like function`() {
|
||||
val list = mutableListOf(1, 2, 3)
|
||||
val list = listOf(1, 2, 3)
|
||||
every { template.query(sql, ofType<RowMapper<*>>(), 3) } returns list
|
||||
assertThat(template.query(sql, 3) { rs, _ ->
|
||||
rs.getInt(1)
|
||||
|
|
|
@ -2,12 +2,6 @@ description = "Spring Messaging"
|
|||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
// Workaround for https://youtrack.jetbrains.com/issue/KT-39610
|
||||
configurations["optional"].attributes.attribute(
|
||||
org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE,
|
||||
objects.named(Usage.class, "java-runtime")
|
||||
)
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(":spring-core"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -132,7 +132,7 @@ class SimpAnnotationMethodMessageHandlerKotlinTests {
|
|||
messageHandler.registerHandler(testController)
|
||||
messageHandler.handleMessage(message)
|
||||
assertThat(testController.exception).isNotNull()
|
||||
assertThat(testController.exception).isInstanceOf(NullPointerException::class.java)
|
||||
assertThat(testController.exception).isInstanceOf(IllegalArgumentException::class.java)
|
||||
}
|
||||
|
||||
private fun createMessage(destination: String, headers: Map<String, String?>): Message<ByteArray> {
|
||||
|
|
|
@ -2,12 +2,6 @@ description = "Spring TestContext Framework"
|
|||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
// Workaround for https://youtrack.jetbrains.com/issue/KT-39610
|
||||
configurations["optional"].attributes.attribute(
|
||||
org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE,
|
||||
objects.named(Usage.class, "java-runtime")
|
||||
)
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-core"))
|
||||
optional(project(":spring-aop"))
|
||||
|
|
|
@ -2,12 +2,6 @@ description = "Spring Transaction"
|
|||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
// Workaround for https://youtrack.jetbrains.com/issue/KT-39610
|
||||
configurations["optional"].attributes.attribute(
|
||||
org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE,
|
||||
objects.named(Usage.class, "java-runtime")
|
||||
)
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(":spring-core"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -139,7 +139,7 @@ class RequestParamMethodArgumentResolverKotlinTests {
|
|||
|
||||
@Test
|
||||
fun resolveNonNullableNotRequiredWithoutParameter() {
|
||||
assertThatExceptionOfType(NullPointerException::class.java).isThrownBy {
|
||||
assertThatExceptionOfType(TypeCastException::class.java).isThrownBy {
|
||||
resolver.resolveArgument(nonNullableParamNotRequired, null, webRequest, binderFactory) as String
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ class RequestParamMethodArgumentResolverKotlinTests {
|
|||
request.method = HttpMethod.POST.name
|
||||
request.contentType = MediaType.MULTIPART_FORM_DATA_VALUE
|
||||
|
||||
assertThatExceptionOfType(NullPointerException::class.java).isThrownBy {
|
||||
assertThatExceptionOfType(TypeCastException::class.java).isThrownBy {
|
||||
resolver.resolveArgument(nonNullableMultipartParamNotRequired, null, webRequest, binderFactory) as MultipartFile
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,6 @@ description = "Spring WebFlux"
|
|||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
// Workaround for https://youtrack.jetbrains.com/issue/KT-39610
|
||||
configurations["optional"].attributes.attribute(
|
||||
org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE,
|
||||
objects.named(Usage.class, "java-runtime")
|
||||
)
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(":spring-core"))
|
||||
|
|
Loading…
Reference in New Issue