From 495ed6c159d2d1f0afd84daa0f202f280c86bf4e Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Mon, 27 Jan 2025 17:29:53 +0100 Subject: [PATCH] Configure Spotless for module descriptors and update copyright --- .../kotlin/junitbuild.spotless-conventions.gradle.kts | 9 +++++++++ .../src/module/org.junit.jupiter.api/module-info.java | 2 +- .../src/module/org.junit.jupiter.engine/module-info.java | 2 +- .../org.junit.jupiter.migrationsupport/module-info.java | 2 +- .../src/module/org.junit.jupiter.params/module-info.java | 2 +- .../src/module/org.junit.jupiter/module-info.java | 2 +- .../module/org.junit.platform.commons/module-info.java | 2 +- .../module/org.junit.platform.console/module-info.java | 2 +- .../module/org.junit.platform.engine/module-info.java | 2 +- .../src/module/org.junit.platform.jfr/module-info.java | 2 +- .../module/org.junit.platform.launcher/module-info.java | 2 +- .../module/org.junit.platform.reporting/module-info.java | 2 +- .../module/org.junit.platform.runner/module-info.java | 2 +- .../module/org.junit.platform.suite.api/module-info.java | 2 +- .../org.junit.platform.suite.commons/module-info.java | 2 +- .../org.junit.platform.suite.engine/module-info.java | 2 +- .../src/module/org.junit.platform.suite/module-info.java | 2 +- .../module/org.junit.platform.testkit/module-info.java | 2 +- .../src/module/org.junit.vintage.engine/module-info.java | 2 +- 19 files changed, 27 insertions(+), 18 deletions(-) diff --git a/gradle/plugins/common/src/main/kotlin/junitbuild.spotless-conventions.gradle.kts b/gradle/plugins/common/src/main/kotlin/junitbuild.spotless-conventions.gradle.kts index 171daf71ff8e..c177b7b211ed 100644 --- a/gradle/plugins/common/src/main/kotlin/junitbuild.spotless-conventions.gradle.kts +++ b/gradle/plugins/common/src/main/kotlin/junitbuild.spotless-conventions.gradle.kts @@ -36,6 +36,15 @@ spotless { endWithNewline() removeUnusedImports() } + + format("moduleDescriptor") { + target(fileTree(layout.projectDirectory.dir("src/module")) { + include("**/module-info.java") + }) + licenseHeaderFile(license.headerFile, "^$") + trimTrailingWhitespace() + endWithNewline() + } } pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { diff --git a/junit-jupiter-api/src/module/org.junit.jupiter.api/module-info.java b/junit-jupiter-api/src/module/org.junit.jupiter.api/module-info.java index 631d5331ae0a..7c069e92c41b 100644 --- a/junit-jupiter-api/src/module/org.junit.jupiter.api/module-info.java +++ b/junit-jupiter-api/src/module/org.junit.jupiter.api/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-jupiter-engine/src/module/org.junit.jupiter.engine/module-info.java b/junit-jupiter-engine/src/module/org.junit.jupiter.engine/module-info.java index 946b1dd3c6fb..4dd53ad8a989 100644 --- a/junit-jupiter-engine/src/module/org.junit.jupiter.engine/module-info.java +++ b/junit-jupiter-engine/src/module/org.junit.jupiter.engine/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-jupiter-migrationsupport/src/module/org.junit.jupiter.migrationsupport/module-info.java b/junit-jupiter-migrationsupport/src/module/org.junit.jupiter.migrationsupport/module-info.java index 3ace009eb0ab..ced462bec0db 100644 --- a/junit-jupiter-migrationsupport/src/module/org.junit.jupiter.migrationsupport/module-info.java +++ b/junit-jupiter-migrationsupport/src/module/org.junit.jupiter.migrationsupport/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-jupiter-params/src/module/org.junit.jupiter.params/module-info.java b/junit-jupiter-params/src/module/org.junit.jupiter.params/module-info.java index 7f3ea0550c58..35569b82dd9d 100644 --- a/junit-jupiter-params/src/module/org.junit.jupiter.params/module-info.java +++ b/junit-jupiter-params/src/module/org.junit.jupiter.params/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-jupiter/src/module/org.junit.jupiter/module-info.java b/junit-jupiter/src/module/org.junit.jupiter/module-info.java index 986039ad9e54..8fd3e579fbaf 100644 --- a/junit-jupiter/src/module/org.junit.jupiter/module-info.java +++ b/junit-jupiter/src/module/org.junit.jupiter/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/module/org.junit.platform.commons/module-info.java b/junit-platform-commons/src/module/org.junit.platform.commons/module-info.java index fb3fdba07a68..176b5fd5c805 100644 --- a/junit-platform-commons/src/module/org.junit.platform.commons/module-info.java +++ b/junit-platform-commons/src/module/org.junit.platform.commons/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/module/org.junit.platform.console/module-info.java b/junit-platform-console/src/module/org.junit.platform.console/module-info.java index 08d28b434f50..166aff5ee795 100644 --- a/junit-platform-console/src/module/org.junit.platform.console/module-info.java +++ b/junit-platform-console/src/module/org.junit.platform.console/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/module/org.junit.platform.engine/module-info.java b/junit-platform-engine/src/module/org.junit.platform.engine/module-info.java index baabf4794d85..e073d5013414 100644 --- a/junit-platform-engine/src/module/org.junit.platform.engine/module-info.java +++ b/junit-platform-engine/src/module/org.junit.platform.engine/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-jfr/src/module/org.junit.platform.jfr/module-info.java b/junit-platform-jfr/src/module/org.junit.platform.jfr/module-info.java index 61aad3ec42a6..6f38bf063cf7 100644 --- a/junit-platform-jfr/src/module/org.junit.platform.jfr/module-info.java +++ b/junit-platform-jfr/src/module/org.junit.platform.jfr/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/module/org.junit.platform.launcher/module-info.java b/junit-platform-launcher/src/module/org.junit.platform.launcher/module-info.java index 9d79f3f4166a..e4e492183f5a 100644 --- a/junit-platform-launcher/src/module/org.junit.platform.launcher/module-info.java +++ b/junit-platform-launcher/src/module/org.junit.platform.launcher/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/module/org.junit.platform.reporting/module-info.java b/junit-platform-reporting/src/module/org.junit.platform.reporting/module-info.java index e871bf2a97fe..f1fe8cd51dca 100644 --- a/junit-platform-reporting/src/module/org.junit.platform.reporting/module-info.java +++ b/junit-platform-reporting/src/module/org.junit.platform.reporting/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-runner/src/module/org.junit.platform.runner/module-info.java b/junit-platform-runner/src/module/org.junit.platform.runner/module-info.java index 47edeb10e7fd..e9dc34ed78d1 100644 --- a/junit-platform-runner/src/module/org.junit.platform.runner/module-info.java +++ b/junit-platform-runner/src/module/org.junit.platform.runner/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/module/org.junit.platform.suite.api/module-info.java b/junit-platform-suite-api/src/module/org.junit.platform.suite.api/module-info.java index 9af8daea9d71..9d8df8da3cf0 100644 --- a/junit-platform-suite-api/src/module/org.junit.platform.suite.api/module-info.java +++ b/junit-platform-suite-api/src/module/org.junit.platform.suite.api/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-commons/src/module/org.junit.platform.suite.commons/module-info.java b/junit-platform-suite-commons/src/module/org.junit.platform.suite.commons/module-info.java index b810efc7f0ec..57bda1477352 100644 --- a/junit-platform-suite-commons/src/module/org.junit.platform.suite.commons/module-info.java +++ b/junit-platform-suite-commons/src/module/org.junit.platform.suite.commons/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2020 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-engine/src/module/org.junit.platform.suite.engine/module-info.java b/junit-platform-suite-engine/src/module/org.junit.platform.suite.engine/module-info.java index f98845cb91ff..0ae28531b366 100644 --- a/junit-platform-suite-engine/src/module/org.junit.platform.suite.engine/module-info.java +++ b/junit-platform-suite-engine/src/module/org.junit.platform.suite.engine/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2020 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite/src/module/org.junit.platform.suite/module-info.java b/junit-platform-suite/src/module/org.junit.platform.suite/module-info.java index 74a575d71c5e..76d5811b4b70 100644 --- a/junit-platform-suite/src/module/org.junit.platform.suite/module-info.java +++ b/junit-platform-suite/src/module/org.junit.platform.suite/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2020 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/module/org.junit.platform.testkit/module-info.java b/junit-platform-testkit/src/module/org.junit.platform.testkit/module-info.java index 2a53f5ad647c..58f2033bcf62 100644 --- a/junit-platform-testkit/src/module/org.junit.platform.testkit/module-info.java +++ b/junit-platform-testkit/src/module/org.junit.platform.testkit/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/module/org.junit.vintage.engine/module-info.java b/junit-vintage-engine/src/module/org.junit.vintage.engine/module-info.java index 859744fcec17..64992a98bf0a 100644 --- a/junit-vintage-engine/src/module/org.junit.vintage.engine/module-info.java +++ b/junit-vintage-engine/src/module/org.junit.vintage.engine/module-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2025 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which