1
1
buildscript {
2
- ext. kotlinVersion = ' 1.2.41 '
2
+ ext. kotlinVersion = ' 1.3.21 '
3
3
repositories {
4
4
maven { url ' https://repo.spring.io/plugins-release' }
5
5
}
@@ -16,12 +16,11 @@ plugins {
16
16
id ' project-report'
17
17
id ' idea'
18
18
id ' org.asciidoctor.convert' version ' 1.5.9.2'
19
+ id ' org.ajoberstar.grgit' version ' 3.0.0'
19
20
}
20
21
21
22
description = ' Spring Kafka'
22
23
23
- def docsDir = ' src/reference/asciidoc'
24
-
25
24
ext {
26
25
linkHomepage = ' https://github.com/spring-projects/spring-kafka'
27
26
linkCi = ' https://build.spring.io/browse/SK'
30
29
linkScmConnection = ' https://github.com/spring-projects/spring-kafka.git'
31
30
linkScmDevConnection
= ' [email protected] :spring-projects/spring-kafka.git'
32
31
docResourcesVersion = ' 0.1.0.RELEASE'
32
+
33
+ modifiedFiles =
34
+ files(grgit. status(). unstaged. modified). filter{ f -> f. name. endsWith(' .java' ) || f. name. endsWith(' .kt' ) }
33
35
}
34
36
35
37
allprojects {
@@ -68,22 +70,21 @@ subprojects { subproject ->
68
70
69
71
ext {
70
72
assertjVersion = ' 3.11.1'
71
- assertkVersion = ' 0.12'
72
73
googleJsr305Version = ' 3.0.2'
73
74
hamcrestVersion = ' 1.3'
74
- hibernateValidationVersion = ' 6.0.12 .Final'
75
+ hibernateValidationVersion = ' 6.0.14 .Final'
75
76
jacksonVersion = ' 2.9.8'
76
77
jaywayJsonPathVersion = ' 2.4.0'
77
78
junit4Version = ' 4.12'
78
- junitJupiterVersion = ' 5.3.2 '
79
- junitPlatformVersion = ' 1.3.2 '
79
+ junitJupiterVersion = ' 5.4.0 '
80
+ junitPlatformVersion = ' 1.4.0 '
80
81
kafkaVersion = ' 2.0.1'
81
- log4jVersion = ' 2.11.1 '
82
- mockitoVersion = ' 2.23.4 '
82
+ log4jVersion = ' 2.11.2 '
83
+ mockitoVersion = ' 2.24.0 '
83
84
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'
87
88
88
89
idPrefix = ' kafka'
89
90
@@ -110,12 +111,8 @@ subprojects { subproject ->
110
111
111
112
testRuntime " org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion "
112
113
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"
119
116
}
120
117
121
118
// enable all compiler warnings; individual projects may customize further
@@ -134,7 +131,7 @@ subprojects { subproject ->
134
131
135
132
checkstyle {
136
133
configFile = file(" ${ rootDir} /src/checkstyle/checkstyle.xml" )
137
- toolVersion = " 8.9 "
134
+ toolVersion = " 8.17 "
138
135
}
139
136
140
137
jacocoTestReport {
@@ -147,6 +144,38 @@ subprojects { subproject ->
147
144
148
145
build. dependsOn jacocoTestReport
149
146
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
+
150
179
task sourcesJar(type : Jar ) {
151
180
classifier = ' sources'
152
181
from sourceSets. main. allJava
0 commit comments