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
This commit is contained in:
Artem Bilan
2020-11-11 11:04:24 -05:00
parent 6565b7cc43
commit 7eb07344cc
6 changed files with 5 additions and 11 deletions

View File

@@ -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'

View File

@@ -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

View File

@@ -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"]
}
}

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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(