Gradle 6.5; Support Building With Java 14

This commit is contained in:
Gary Russell
2020-06-17 16:08:17 -04:00
committed by Artem Bilan
parent 7974331b33
commit 45fb5da44e
9 changed files with 19 additions and 11 deletions

View File

@@ -169,6 +169,7 @@ subprojects { subproject ->
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
maxHeapSize = '1536m'
// jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:8111'
jacoco {
destinationFile = file("$buildDir/jacoco.exec")
}

Binary file not shown.

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

2
gradlew vendored
View File

@@ -82,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath

1
gradlew.bat vendored
View File

@@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%*
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

View File

@@ -148,11 +148,11 @@ public class DelegatingDeserializer implements Deserializer<Object> {
Map<String, Deserializer<?>> delegateMap, String selector, Class<?> clazz) {
try {
Deserializer<?> delegate = (Deserializer<?>) clazz.newInstance();
Deserializer<?> delegate = (Deserializer<?>) clazz.getDeclaredConstructor().newInstance();
delegate.configure(configs, isKey);
delegateMap.put(selector.trim(), delegate);
}
catch (InstantiationException | IllegalAccessException e) {
catch (Exception e) {
throw new IllegalArgumentException(e);
}
}

View File

@@ -177,11 +177,11 @@ public class DelegatingSerializer implements Serializer<Object> {
Map<String, Serializer<?>> delegateMap, String selector, Class<?> clazz) {
try {
Serializer<?> delegate = (Serializer<?>) clazz.newInstance();
Serializer<?> delegate = (Serializer<?>) clazz.getDeclaredConstructor().newInstance();
delegate.configure(configs, isKey);
delegateMap.put(selector.trim(), delegate);
}
catch (InstantiationException | IllegalAccessException e) {
catch (Exception e) {
throw new IllegalArgumentException(e);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 the original author or authors.
* Copyright 2018-2020 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.
@@ -141,9 +141,9 @@ public class ErrorHandlingDeserializer<T> implements Deserializer<T> {
try {
Object value = configs.get(configKey);
Class<?> clazz = value instanceof Class ? (Class<?>) value : ClassUtils.forName((String) value, null);
this.delegate = setupDelegate(clazz.newInstance());
this.delegate = setupDelegate(clazz.getDeclaredConstructor().newInstance());
}
catch (ClassNotFoundException | LinkageError | InstantiationException | IllegalAccessException e) {
catch (Exception e) {
throw new IllegalStateException(e);
}
}
@@ -163,9 +163,10 @@ public class ErrorHandlingDeserializer<T> implements Deserializer<T> {
Class<?> clazz = value instanceof Class ? (Class<?>) value : ClassUtils.forName((String) value, null);
Assert.isTrue(Function.class.isAssignableFrom(clazz), "'function' must be a 'Function ', not a "
+ clazz.getName());
this.failedDeserializationFunction = (Function<FailedDeserializationInfo, T>) clazz.newInstance();
this.failedDeserializationFunction = (Function<FailedDeserializationInfo, T>)
clazz.getDeclaredConstructor().newInstance();
}
catch (ClassNotFoundException | LinkageError | InstantiationException | IllegalAccessException e) {
catch (Exception e) {
throw new IllegalStateException(e);
}
}

View File

@@ -71,8 +71,11 @@ public class RecordMessagingMessageListenerAdapterTests {
for (Method method : declaredMethods) {
if (method.getName().equals("defListen")) {
defMethod = method;
methods.add(method);
}
else if (method.getName().equals("listen")) {
methods.add(method);
}
methods.add(method);
}
TestMultiClass bean = new TestMultiClass();
MultiMethodKafkaListenerEndpoint<Object, Object> endpoint = new MultiMethodKafkaListenerEndpoint<>(methods,