From 0af7e620ad68fef596c1a6715c49a7cf0eaca2cb Mon Sep 17 00:00:00 2001 From: Big Andy <8012398+big-andy-coates@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:38:52 +0000 Subject: [PATCH] Fix automatic module name which can't have `-`, so replace with `.` --- .../src/main/kotlin/creek-coverage-convention.gradle.kts | 8 ++++---- .../kotlin/creek-plugin-publishing-convention.gradle.kts | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/kotlin/creek-coverage-convention.gradle.kts b/buildSrc/src/main/kotlin/creek-coverage-convention.gradle.kts index a5fa456..5acbaba 100644 --- a/buildSrc/src/main/kotlin/creek-coverage-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/creek-coverage-convention.gradle.kts @@ -17,9 +17,9 @@ /** * Standard coverage configuration of Creek projects, utilising Jacoco and Coveralls.io * - *
Version: 1.2 - * - *
Apply to root project only + *
Versions:
+ * - 1.3: remove deprecated use of $buildDir
+ * - 1.2: Apply to root project only
*/
plugins {
@@ -64,7 +64,7 @@ val coverage = tasks.register Version: 1.5
+ * Versions:
+ * - 1.6: Correct automatic module name
* - 1.5: Switch to using `gradlePlugin`, as required by Gradle 8.0
* - 1.4: Fix website URL to avoid redirect
* - 1.3: Switch to setting 'system' from issue-management
@@ -66,9 +67,9 @@ tasks.javadoc {
tasks.jar {
manifest {
if (prependRootName) {
- attributes("Automatic-Module-Name" to "${rootProject.name}-${project.name}")
+ attributes("Automatic-Module-Name" to "${rootProject.name}-${project.name}".replace("-", "."))
} else {
- attributes("Automatic-Module-Name" to project.name)
+ attributes("Automatic-Module-Name" to project.name.replace("-", "."))
}
}
}