Skip to content

Commit ce9df8a

Browse files
artembilangaryrussell
authored andcommitted
Upgrade to Gradle 4.7 and others, build polishing
* Upgrade all the dependencies to their latest version * Remove Spring IO plugin stuff as it isn't supported any more * Remove redundant dependencies since they are polled transitively *
1 parent ad28b91 commit ce9df8a

File tree

3 files changed

+19
-67
lines changed

3 files changed

+19
-67
lines changed

Diff for: build.gradle

+18-66
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,21 @@ buildscript {
33
maven { url 'https://repo.spring.io/plugins-release' }
44
}
55
dependencies {
6-
classpath 'io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE'
7-
classpath 'io.spring.gradle:spring-io-plugin:0.0.8.RELEASE'
86
classpath 'io.spring.gradle:docbook-reference-plugin:0.3.1'
9-
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
7+
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
108
}
119
}
1210

1311
plugins {
14-
id 'org.sonarqube' version '2.5'
12+
id 'org.sonarqube' version '2.6.2'
1513
id 'base'
1614
id 'project-report'
1715
id 'idea'
1816
}
1917

2018
description = 'Spring Kafka'
2119

22-
def docsDir = 'src/reference/asciidoc' // Will be default with newer asciidoctor plugin
20+
def docsDir = 'src/reference/asciidoc'
2321

2422
ext {
2523
linkHomepage = 'https://github.com/spring-projects/spring-kafka'
@@ -36,7 +34,7 @@ allprojects {
3634

3735
repositories {
3836
maven { url 'https://repo.spring.io/libs-milestone' }
39-
if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) {
37+
if (version.endsWith('BUILD-SNAPSHOT')) {
4038
maven { url 'https://repo.spring.io/libs-snapshot' }
4139
}
4240
}
@@ -52,18 +50,6 @@ subprojects { subproject ->
5250
apply plugin: 'jacoco'
5351
apply plugin: 'checkstyle'
5452

55-
if (project.hasProperty('platformVersion')) {
56-
apply plugin: 'spring-io'
57-
58-
dependencyManagement {
59-
springIoTestRuntime {
60-
imports {
61-
mavenBom "io.spring.platform:platform-bom:${platformVersion}"
62-
}
63-
}
64-
}
65-
}
66-
6753
compileJava {
6854
sourceCompatibility = 1.8
6955
targetCompatibility = 1.8
@@ -72,19 +58,18 @@ subprojects { subproject ->
7258
ext {
7359
assertjVersion = '3.9.1'
7460
hamcrestVersion = '1.3'
75-
jacksonVersion = '2.9.4'
61+
jacksonVersion = '2.9.5'
7662
jaywayJsonPathVersion = '2.4.0'
7763
junit4Version = '4.12'
78-
junitJupiterVersion = '5.1.0'
79-
junitPlatformVersion = '1.1.0'
80-
junitVintageVersion = '5.1.0'
64+
junitJupiterVersion = '5.1.1'
65+
junitPlatformVersion = '1.1.1'
8166
kafkaVersion = '1.1.0'
8267
log4jVersion = '2.11.0'
83-
mockitoVersion = '2.15.0'
68+
mockitoVersion = '2.18.0'
8469
scalaVersion = '2.11'
8570
springRetryVersion = '1.2.2.RELEASE'
86-
springVersion = '5.0.4.RELEASE'
87-
springDataCommonsVersion = '2.0.4.RELEASE'
71+
springVersion = '5.1.0.BUILD-SNAPSHOT'
72+
springDataCommonsVersion = '2.1.0.BUILD-SNAPSHOT'
8873

8974
idPrefix = 'kafka'
9075

@@ -103,12 +88,11 @@ subprojects { subproject ->
10388
testRuntime "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
10489

10590
// To support JUnit 4 tests
106-
testRuntime "org.junit.vintage:junit-vintage-engine:$junitVintageVersion"
91+
testRuntime "org.junit.vintage:junit-vintage-engine:$junitJupiterVersion"
10792

10893
// To avoid compiler warnings about @API annotations in JUnit code
10994
testCompileOnly 'org.apiguardian:apiguardian-api:1.0.0'
11095

111-
testRuntime "org.apache.logging.log4j:log4j-core:$log4jVersion"
11296
testRuntime "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
11397
}
11498

@@ -128,7 +112,7 @@ subprojects { subproject ->
128112

129113
checkstyle {
130114
configFile = file("${rootDir}/src/checkstyle/checkstyle.xml")
131-
toolVersion = "8.8"
115+
toolVersion = "8.9"
132116
}
133117

134118
jacocoTestReport {
@@ -191,8 +175,6 @@ project ('spring-kafka') {
191175
compile ("com.jayway.jsonpath:json-path:$jaywayJsonPathVersion", optional)
192176

193177
testCompile project (":spring-kafka-test")
194-
testCompile "org.assertj:assertj-core:$assertjVersion"
195-
testCompile "org.springframework:spring-tx:$springVersion"
196178
}
197179
}
198180

@@ -222,12 +204,13 @@ project ('spring-kafka-test') {
222204
}
223205
}
224206

225-
apply plugin: org.asciidoctor.gradle.AsciidoctorPlugin
207+
apply plugin: 'org.asciidoctor.convert'
226208

227209
asciidoctor {
228-
sourceDir file("$docsDir")
229-
sourceDocumentNames = files("$docsDir/index.adoc") // Change in >= 1.5.1
230-
outputDir file("$buildDir/html")
210+
sourceDir = file("$docsDir")
211+
sources {
212+
include 'index.adoc'
213+
}
231214
backends = ['html5', 'docbook']
232215
logDocuments = true
233216
options = [
@@ -250,7 +233,7 @@ apply plugin: DocbookReferencePlugin
250233

251234
reference {
252235
sourceFileName = 'index.xml'
253-
sourceDir = file("$buildDir/html")
236+
sourceDir = file("$buildDir/reference-work/docbook")
254237
pdfFilename = 'spring-kafka-reference.pdf'
255238
expandPlaceholders = ''
256239
}
@@ -339,37 +322,6 @@ task distZip(type: Zip, dependsOn: [docsZip]) { //, schemaZip]) {
339322
}
340323
}
341324

342-
/*
343-
// Create an optional "with dependencies" distribution.
344-
// Not published by default; only for use when building from source.
345-
task depsZip(type: Zip, dependsOn: distZip) { zipTask ->
346-
group = 'Distribution'
347-
classifier = 'dist-with-deps'
348-
description = "Builds -${classifier} archive, containing everything " +
349-
"in the -${distZip.classifier} archive plus all dependencies."
350-
351-
from zipTree(distZip.archivePath)
352-
353-
gradle.taskGraph.whenReady { taskGraph ->
354-
if (taskGraph.hasTask(":${zipTask.name}")) {
355-
def projectName = rootProject.name
356-
def artifacts = new HashSet()
357-
358-
rootProject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
359-
def dependency = artifact.moduleVersion.id
360-
if (!projectName.equals(dependency.name)) {
361-
artifacts << artifact.file
362-
}
363-
}
364-
365-
zipTask.from(artifacts) {
366-
into "${distZip.baseDir}/deps"
367-
}
368-
}
369-
}
370-
}
371-
*/
372-
373325
artifacts {
374326
archives distZip
375327
archives docsZip

Diff for: gradle/wrapper/gradle-wrapper.jar

84 Bytes
Binary file not shown.

Diff for: gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)