Skip to content

Commit 20e5147

Browse files
committed
Upgrade dependencies; prepare for release
1 parent c963a35 commit 20e5147

File tree

1 file changed

+48
-19
lines changed

1 file changed

+48
-19
lines changed

build.gradle

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlinVersion = '1.2.41'
2+
ext.kotlinVersion = '1.3.21'
33
repositories {
44
maven { url 'https://repo.spring.io/plugins-release' }
55
}
@@ -16,12 +16,11 @@ plugins {
1616
id 'project-report'
1717
id 'idea'
1818
id 'org.asciidoctor.convert' version '1.5.9.2'
19+
id 'org.ajoberstar.grgit' version '3.0.0'
1920
}
2021

2122
description = 'Spring Kafka'
2223

23-
def docsDir = 'src/reference/asciidoc'
24-
2524
ext {
2625
linkHomepage = 'https://github.com/spring-projects/spring-kafka'
2726
linkCi = 'https://build.spring.io/browse/SK'
@@ -30,6 +29,9 @@ ext {
3029
linkScmConnection = 'https://github.com/spring-projects/spring-kafka.git'
3130
linkScmDevConnection = '[email protected]:spring-projects/spring-kafka.git'
3231
docResourcesVersion = '0.1.0.RELEASE'
32+
33+
modifiedFiles =
34+
files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
3335
}
3436

3537
allprojects {
@@ -68,22 +70,21 @@ subprojects { subproject ->
6870

6971
ext {
7072
assertjVersion = '3.11.1'
71-
assertkVersion = '0.12'
7273
googleJsr305Version = '3.0.2'
7374
hamcrestVersion = '1.3'
74-
hibernateValidationVersion = '6.0.12.Final'
75+
hibernateValidationVersion = '6.0.14.Final'
7576
jacksonVersion = '2.9.8'
7677
jaywayJsonPathVersion = '2.4.0'
7778
junit4Version = '4.12'
78-
junitJupiterVersion = '5.3.2'
79-
junitPlatformVersion = '1.3.2'
79+
junitJupiterVersion = '5.4.0'
80+
junitPlatformVersion = '1.4.0'
8081
kafkaVersion = '2.0.1'
81-
log4jVersion = '2.11.1'
82-
mockitoVersion = '2.23.4'
82+
log4jVersion = '2.11.2'
83+
mockitoVersion = '2.24.0'
8384
scalaVersion = '2.11'
84-
springRetryVersion = '1.2.3.RELEASE'
85-
springVersion = '5.1.4.RELEASE'
86-
springDataCommonsVersion = '2.1.4.RELEASE'
85+
springRetryVersion = '1.2.4.RELEASE'
86+
springVersion = '5.1.5.RELEASE'
87+
springDataCommonsVersion = '2.1.5.RELEASE'
8788

8889
idPrefix = 'kafka'
8990

@@ -110,12 +111,8 @@ subprojects { subproject ->
110111

111112
testRuntime "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
112113

113-
testCompile("com.willowtreeapps.assertk:assertk-jvm:$assertkVersion") {
114-
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-reflect'
115-
}
116-
117-
testCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
118-
testRuntime "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
114+
testCompile "org.jetbrains.kotlin:kotlin-reflect"
115+
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
119116
}
120117

121118
// enable all compiler warnings; individual projects may customize further
@@ -134,7 +131,7 @@ subprojects { subproject ->
134131

135132
checkstyle {
136133
configFile = file("${rootDir}/src/checkstyle/checkstyle.xml")
137-
toolVersion = "8.9"
134+
toolVersion = "8.17"
138135
}
139136

140137
jacocoTestReport {
@@ -147,6 +144,38 @@ subprojects { subproject ->
147144

148145
build.dependsOn jacocoTestReport
149146

147+
148+
task updateCopyrights {
149+
onlyIf { !System.getenv('TRAVIS') && !System.getenv('bamboo_buildKey') }
150+
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) })
151+
outputs.dir('build')
152+
153+
doLast {
154+
def now = Calendar.instance.get(Calendar.YEAR) as String
155+
inputs.files.each { file ->
156+
def line
157+
file.withReader { reader ->
158+
while (line = reader.readLine()) {
159+
def matcher = line =~ /Copyright (20\d\d)-?(20\d\d)?/
160+
if (matcher.count) {
161+
def beginningYear = matcher[0][1]
162+
if (now != beginningYear || now != matcher[0][2]) {
163+
def years = "$beginningYear-$now"
164+
def sourceCode = file.text
165+
sourceCode = sourceCode.replaceFirst(/20\d\d(-20\d\d)?/, years)
166+
file.write(sourceCode)
167+
println "Copyright updated for file: $file"
168+
}
169+
break
170+
}
171+
}
172+
}
173+
}
174+
}
175+
}
176+
177+
processResources.dependsOn updateCopyrights
178+
150179
task sourcesJar(type: Jar) {
151180
classifier = 'sources'
152181
from sourceSets.main.allJava

0 commit comments

Comments
 (0)