Skip to content

Commit d65f7cc

Browse files
committed
Update copyright years to use present instead of specific end year
Update build.gradle to remove the updateCopyrights tasks
1 parent 773260c commit d65f7cc

File tree

561 files changed

+560
-591
lines changed

Some content is hidden

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

561 files changed

+560
-591
lines changed

build.gradle

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -206,37 +206,6 @@ configure(javaProjects) { subproject ->
206206
}
207207
}
208208

209-
tasks.register('updateCopyrights') {
210-
onlyIf { !isCI }
211-
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) })
212-
outputs.dir('build/classes')
213-
214-
doLast {
215-
def now = Calendar.instance.get(Calendar.YEAR) as String
216-
inputs.files.each { file ->
217-
def line
218-
file.withReader { reader ->
219-
while (line = reader.readLine()) {
220-
def matcher = line =~ /Copyright (20\d\d)-?(20\d\d)?/
221-
if (matcher.count) {
222-
def beginningYear = matcher[0][1]
223-
if (now != beginningYear && now != matcher[0][2]) {
224-
def years = "$beginningYear-$now"
225-
def sourceCode = file.getText('UTF-8')
226-
sourceCode = sourceCode.replaceFirst(/20\d\d(-20\d\d)?/, years)
227-
file.write(sourceCode)
228-
println "Copyright updated for file: $file"
229-
}
230-
break
231-
}
232-
}
233-
}
234-
}
235-
}
236-
}
237-
238-
compileKotlin.dependsOn updateCopyrights
239-
240209
jar {
241210
manifest {
242211
attributes(

samples/sample-01/src/main/java/com/common/Foo1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-01/src/main/java/com/common/Foo2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-01/src/main/java/com/example/Application.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-01/src/main/java/com/example/Controller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-01/src/test/java/com/example/ApplicationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-02/src/main/java/com/common/Bar1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-02/src/main/java/com/common/Bar2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-02/src/main/java/com/common/Foo1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-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.

samples/sample-02/src/main/java/com/common/Foo2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-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)