Skip to content

Commit f121637

Browse files
spring-buildsartembilan
authored andcommitted
Migrate Copyright to -present pattern instead of current year
* Remove redundant now `updateCopyrights` Gradle task * Fix `checkstyle-header.txt` for a new pattern
1 parent 2b949cb commit f121637

File tree

3,021 files changed

+3020
-3051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,021 files changed

+3020
-3051
lines changed

build.gradle

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -322,37 +322,6 @@ configure(javaProjects) { subproject ->
322322
ext.xLintArg = '-Xlint:all,-options,-processing'
323323
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg, '-parameters']
324324

325-
tasks.register('updateCopyrights') {
326-
onlyIf { !isCI }
327-
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) })
328-
outputs.dir('build/classes')
329-
330-
doLast {
331-
def now = Calendar.instance.get(Calendar.YEAR) as String
332-
inputs.files.each { file ->
333-
def line
334-
file.withReader { reader ->
335-
while (line = reader.readLine()) {
336-
def matcher = line =~ /Copyright (20\d\d)-?(20\d\d)?/
337-
if (matcher.count) {
338-
def beginningYear = matcher[0][1]
339-
if (now != beginningYear && now != matcher[0][2]) {
340-
def years = "$beginningYear-$now"
341-
def sourceCode = file.getText('UTF-8')
342-
sourceCode = sourceCode.replaceFirst(/20\d\d(-20\d\d)?/, years)
343-
file.text = sourceCode
344-
println "Copyright updated for file: $file"
345-
}
346-
break
347-
}
348-
}
349-
}
350-
}
351-
}
352-
}
353-
354-
compileKotlin.dependsOn updateCopyrights
355-
356325
tasks.register('testAll', Test) { dependsOn['check'] }
357326

358327
gradle.taskGraph.whenReady { graph ->

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/AbstractAmqpChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/AbstractSubscribableAmqpChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/PointToPointSubscribableAmqpChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/PollableAmqpChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2025 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/PublishSubscribeAmqpChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/config/AbstractAmqpInboundAdapterParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2025 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/config/AmqpChannelFactoryBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2025 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/config/AmqpChannelParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/config/AmqpInboundChannelAdapterParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-present the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)