Main to 3.0; SF 6.0; JDK 17
Initial Commit for Spring Framework 6.0/JDK 17 * PR review comments; build is green. Fix Spring Data version; fix deprecations Fix checkstyle Add mavenCentral() for GE Plugin
This commit is contained in:
4
.github/workflows/pr-build-workflow.yml
vendored
4
.github/workflows/pr-build-workflow.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
java-version: 17
|
||||
|
||||
- name: Run Gradle
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
|
||||
47
build.gradle
47
build.gradle
@@ -2,7 +2,7 @@ buildscript {
|
||||
ext.kotlinVersion = '1.5.31'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://plugins.gradle.org/m2' }
|
||||
gradlePluginPortal()
|
||||
maven { url 'https://repo.spring.io/plugins-release' }
|
||||
}
|
||||
dependencies {
|
||||
@@ -44,6 +44,11 @@ ext {
|
||||
linkScmDevConnection = 'git@github.com:spring-projects/spring-kafka.git'
|
||||
docResourcesVersion = '0.2.5'
|
||||
|
||||
javadocLinks = [
|
||||
'https://docs.oracle.com/en/java/javase/17/docs/api/',
|
||||
'https://docs.spring.io/spring-framework/docs/current/javadoc-api/'
|
||||
] as String[]
|
||||
|
||||
|
||||
if (gitPresent) {
|
||||
modifiedFiles =
|
||||
@@ -56,7 +61,7 @@ ext {
|
||||
hamcrestVersion = '2.2'
|
||||
hibernateValidationVersion = '6.2.0.Final'
|
||||
jacksonBomVersion = '2.13.1'
|
||||
jaywayJsonPathVersion = '2.4.0'
|
||||
jaywayJsonPathVersion = '2.6.0'
|
||||
junit4Version = '4.13.2'
|
||||
junitJupiterVersion = '5.8.2'
|
||||
kafkaVersion = '3.0.0'
|
||||
@@ -65,10 +70,10 @@ ext {
|
||||
mockitoVersion = '4.0.0'
|
||||
reactorVersion = '2020.0.14'
|
||||
scalaVersion = '2.13'
|
||||
springBootVersion = '2.5.7' // docs module
|
||||
springDataVersion = '2021.1.0'
|
||||
springBootVersion = '2.6.1-SNAPSHOT' // docs module
|
||||
springDataVersion = '2022.1.0-SNAPSHOT'
|
||||
springRetryVersion = '1.3.1'
|
||||
springVersion = '5.3.14'
|
||||
springVersion = '6.0.0-SNAPSHOT'
|
||||
zookeeperVersion = '3.6.3'
|
||||
|
||||
idPrefix = 'kafka'
|
||||
@@ -136,25 +141,25 @@ subprojects { subproject ->
|
||||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
sourceCompatibility = 17
|
||||
targetCompatibility = 17
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
sourceCompatibility = 11
|
||||
sourceCompatibility = 17
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
jvmTarget = '16'
|
||||
}
|
||||
}
|
||||
|
||||
eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature'
|
||||
|
||||
jacoco {
|
||||
toolVersion = '0.8.6'
|
||||
toolVersion = '0.8.7'
|
||||
}
|
||||
|
||||
// dependencies that are common across all java projects
|
||||
@@ -291,6 +296,11 @@ subprojects { subproject ->
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
options.addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint
|
||||
options.addBooleanOption('Werror', true) // fail build on Javadoc warnings
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
project ('spring-kafka') {
|
||||
@@ -374,7 +384,7 @@ project ('spring-kafka-docs') {
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
jvmTarget = '16'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,10 +495,17 @@ task api(type: Javadoc) {
|
||||
group = 'Documentation'
|
||||
description = 'Generates aggregated Javadoc API documentation.'
|
||||
title = "${rootProject.description} ${version} API"
|
||||
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
||||
options.author = true
|
||||
options.header = rootProject.description
|
||||
options.overview = 'src/api/overview.html'
|
||||
options {
|
||||
encoding = 'UTF-8'
|
||||
memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
||||
author = true
|
||||
header = rootProject.description
|
||||
use = true
|
||||
overview = 'src/api/overview.html'
|
||||
splitIndex = true
|
||||
links(project.ext.javadocLinks)
|
||||
addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint
|
||||
}
|
||||
|
||||
source subprojects.collect { project ->
|
||||
project.sourceSets.main.allJava
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
version=2.8.2-SNAPSHOT
|
||||
version=3.0.0-SNAPSHOT
|
||||
org.gradle.jvmargs=-Xmx1536M -Dfile.encoding=UTF-8
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
kotlin.stdlib.default.dependency=false
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven { url 'https://repo.spring.io/plugins-release' }
|
||||
}
|
||||
|
||||
@@ -23,7 +23,10 @@ import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasPartition
|
||||
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasTimestamp;
|
||||
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasValue;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||
import org.apache.kafka.common.header.internals.RecordHeaders;
|
||||
import org.apache.kafka.common.record.TimestampType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -36,8 +39,8 @@ public class KafkaMatchersTests {
|
||||
|
||||
@Test
|
||||
public void testKeyMatcher() {
|
||||
ConsumerRecord<String, String> record = new ConsumerRecord<>("topic", 0, 10,
|
||||
1487694048607L, TimestampType.CREATE_TIME, 123L, 2, 3, "key1", "value1");
|
||||
ConsumerRecord<String, String> record = new ConsumerRecord<>("topic", 0, 10, 1487694048607L,
|
||||
TimestampType.CREATE_TIME, 2, 3, "key1", "value1", new RecordHeaders(), Optional.empty());
|
||||
assertThat(record, hasKey("key1"));
|
||||
assertThat(record, hasValue("value1"));
|
||||
assertThat(record, hasPartition(0));
|
||||
@@ -47,8 +50,8 @@ public class KafkaMatchersTests {
|
||||
|
||||
@Test
|
||||
public void noMatchOnTimestamp() {
|
||||
ConsumerRecord<String, String> record = new ConsumerRecord<>("topic", 0, 10,
|
||||
1487694048607L, TimestampType.CREATE_TIME, 123L, 2, 3, "key1", "value1");
|
||||
ConsumerRecord<String, String> record = new ConsumerRecord<>("topic", 0, 10, 1487694048607L,
|
||||
TimestampType.CREATE_TIME, 2, 3, "key1", "value1", new RecordHeaders(), Optional.empty());
|
||||
|
||||
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> assertThat(record, hasTimestamp(123L)))
|
||||
.withMessageContaining(
|
||||
|
||||
Reference in New Issue
Block a user