From ac2ef095103ea5984693f200b0da44994e4c7862 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:43:21 +0100 Subject: [PATCH] replaced underscores with dashes in Group ID, to match Gradle Plugin ID Add Maven relocation information --- build.gradle.kts | 2 +- modules/bcv-gradle-plugin/build.gradle.kts | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index fd68fc2..6e678c1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { idea } -group = "dev.adamko.kotlin.binary_compatibility_validator" +group = "dev.adamko.kotlin.binary-compatibility-validator" project.version = object { private val gitVersion = project.gitVersion override fun toString(): String = gitVersion.get() diff --git a/modules/bcv-gradle-plugin/build.gradle.kts b/modules/bcv-gradle-plugin/build.gradle.kts index 388fcf0..557ff59 100644 --- a/modules/bcv-gradle-plugin/build.gradle.kts +++ b/modules/bcv-gradle-plugin/build.gradle.kts @@ -103,3 +103,30 @@ tasks.withType>().configureEach { binaryCompatibilityValidator { ignoredMarkers.add("dev.adamko.kotlin.binary_compatibility_validator.internal.BCVInternalApi") } + + +publishing { + publications { + register("relocation") { + pom { + val relocationMessage = + "Relocated artifact. Replaced underscores with dashes in the Group ID, to match BCV-MU's Gradle Plugin ID." + name = "Binary Compatibility Validator MU [RELOCATION MARKER]" + description = relocationMessage + + // Old artifact coordinates + groupId = "dev.adamko.kotlin.binary_compatibility_validator" + artifactId = "bcv-gradle-plugin" + + distributionManagement { + relocation { + // New artifact coordinates + groupId = project.group.toString() + artifactId = project.name + message = relocationMessage + } + } + } + } + } +}