Skip to content

Commit 60c49aa

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 ff9bab8 commit 60c49aa

File tree

3,010 files changed

+3009
-3040
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,010 files changed

+3009
-3040
lines changed

build.gradle

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

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

361330
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-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/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-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/AmqpChannelFactoryBean.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/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)