Skip to content

Commit dbd6ff3

Browse files
authored
Update Spotless convention to force update copyright year (#14)
* Update Spotless convention to force update copyright year * Update copyright year * Add current year as input * Apply spotless
1 parent 79fbccc commit dbd6ff3

File tree

11 files changed

+22
-12
lines changed

11 files changed

+22
-12
lines changed

plugin/src/main/kotlin/io/getstream/android/BaseConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/GenerateLicenseFileTask.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
1616
package io.getstream.android
1717

1818
import java.io.BufferedReader
19+
import java.time.Year
1920
import org.gradle.api.DefaultTask
2021
import org.gradle.api.file.ConfigurableFileCollection
2122
import org.gradle.api.file.RegularFileProperty
@@ -39,6 +40,11 @@ abstract class GenerateLicenseFileTask : DefaultTask() {
3940

4041
@get:Input abstract val templateName: Property<String>
4142

43+
// Added as input so the cache is invalidated when the year changes
44+
@get:Input
45+
val currentYear: Int
46+
get() = Year.now().value
47+
4248
/**
4349
* The classpath containing the plugin resources (the plugin JAR itself). Used to track changes
4450
* to the template files so the task is re-run.
@@ -61,6 +67,10 @@ abstract class GenerateLicenseFileTask : DefaultTask() {
6167
outputFile
6268
.get()
6369
.asFile
64-
.writeText(templateContent.replace("\$PROJECT", repositoryName.get()))
70+
.writeText(
71+
templateContent
72+
.replace("\$PROJECT", repositoryName.get())
73+
.replace("\$YEAR", "$currentYear")
74+
)
6575
}
6676
}

plugin/src/main/kotlin/io/getstream/android/GradleUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/StreamConventionExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/StreamConventionPlugins.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/coverage/CoverageConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/coverage/CoverageOptions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/publishing/PublishingConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/publishing/PublishingOptions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

plugin/src/main/kotlin/io/getstream/android/spotless/SpotlessConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
2+
* Copyright (c) 2014-2026 Stream.io Inc. All rights reserved.
33
*
44
* Licensed under the Stream License;
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)