From 7eb07344cc4910d767900eb2a921f9fb03bec2a4 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 11 Nov 2020 11:04:24 -0500 Subject: [PATCH] GH-3428: Make Kotlin dependency optional again Fixes https://github.com/spring-projects/spring-integration/issues/3428 The Kotlin Gradle plugin starting with Kotlin `1.4` adds a standard Kotlin lib into `compile` scope fully ignoring an `optional` variant. See more info here: https://kotlinlang.org/docs/reference/using-gradle.html#dependency-on-the-standard-library * Add `kotlin.stdlib.default.dependency=false` into `gradle.properties` to rely only on the explicit dependency definitions in the project config * Remove explicit Kotlin deps from test scope in the target modules since it is declared globally for all the modules * Fix author emails in the `publish-maven.gradle` to their VMware variants * Remove usage of `org.jetbrains.annotations` in favor of `@Nullable` from Spring Framework --- build.gradle | 2 -- gradle.properties | 1 + publish-maven.gradle | 6 +++--- .../integration/jdbc/config/StoredProcParserUtils.java | 2 -- .../integration/redis/inbound/RedisQueueInboundGateway.java | 3 +-- .../integration/stomp/AbstractStompSessionManager.java | 2 -- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index d71f673059..7b49aedf48 100644 --- a/build.gradle +++ b/build.gradle @@ -603,8 +603,6 @@ project('spring-integration-kafka') { testImplementation "org.springframework.kafka:spring-kafka-test:$springKafkaVersion" testImplementation "com.willowtreeapps.assertk:assertk-jvm:$assertkVersion" - testImplementation 'org.jetbrains.kotlin:kotlin-reflect' - testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion" testRuntimeOnly 'com.fasterxml.jackson.core:jackson-core' diff --git a/gradle.properties b/gradle.properties index e55bec2bb3..d845a1fd69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,3 +2,4 @@ version=5.4.1-SNAPSHOT org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8 org.gradle.caching=true org.gradle.parallel=true +kotlin.stdlib.default.dependency=false \ No newline at end of file diff --git a/publish-maven.gradle b/publish-maven.gradle index 5603bd62cf..b3bb86a930 100644 --- a/publish-maven.gradle +++ b/publish-maven.gradle @@ -30,19 +30,19 @@ publishing { developer { id = 'abilan' name = 'Artem Bilan' - email = 'abilan@pivotal.io' + email = 'abilan@vmware.com' roles = ["project lead"] } developer { id = 'garyrussell' name = 'Gary Russell' - email = 'grussell@pivotal.io' + email = 'grussell@vmware.com' roles = ["project lead emeritus"] } developer { id = 'markfisher' name = 'Mark Fisher' - email = 'mfisher@pivotal.io' + email = 'markfisher@vmware.com' roles = ["project founder and lead emeritus"] } } diff --git a/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/config/StoredProcParserUtils.java b/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/config/StoredProcParserUtils.java index 7951ed2de3..7a576b0d16 100644 --- a/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/config/StoredProcParserUtils.java +++ b/spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/config/StoredProcParserUtils.java @@ -21,7 +21,6 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.jetbrains.annotations.NotNull; import org.w3c.dom.Element; import org.springframework.beans.BeanMetadataElement; @@ -148,7 +147,6 @@ public final class StoredProcParserUtils { } } - @NotNull private static BeanDefinitionBuilder createParameterBeanDefinitionBuilder(Element storedProcComponent, ParserContext parserContext, String direction, String returnType) { diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueInboundGateway.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueInboundGateway.java index 22af955d52..b074ea4250 100644 --- a/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueInboundGateway.java +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueInboundGateway.java @@ -19,8 +19,6 @@ package org.springframework.integration.redis.inbound; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import org.jetbrains.annotations.Nullable; - import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; @@ -39,6 +37,7 @@ import org.springframework.integration.util.ErrorHandlingTaskExecutor; import org.springframework.jmx.export.annotation.ManagedMetric; import org.springframework.jmx.export.annotation.ManagedOperation; import org.springframework.jmx.export.annotation.ManagedResource; +import org.springframework.lang.Nullable; import org.springframework.messaging.Message; import org.springframework.messaging.MessagingException; import org.springframework.scheduling.SchedulingAwareRunnable; diff --git a/spring-integration-stomp/src/main/java/org/springframework/integration/stomp/AbstractStompSessionManager.java b/spring-integration-stomp/src/main/java/org/springframework/integration/stomp/AbstractStompSessionManager.java index e9ff9c3702..8aa7b52a76 100644 --- a/spring-integration-stomp/src/main/java/org/springframework/integration/stomp/AbstractStompSessionManager.java +++ b/spring-integration-stomp/src/main/java/org/springframework/integration/stomp/AbstractStompSessionManager.java @@ -27,7 +27,6 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.DisposableBean; @@ -215,7 +214,6 @@ public abstract class AbstractStompSessionManager implements StompSessionManager } } - @NotNull private CountDownLatch addStompSessionCallback(int currentEpoch) { CountDownLatch connectLatch = new CountDownLatch(1); this.stompSessionListenableFuture.addCallback(