Skip to content

Commit

Permalink
WIP: add maven relocation block to ktlint-cli and `ktlint-cli-repor…
Browse files Browse the repository at this point in the history
…ter-baseline`

When publishing to the local Maven repository, a `0.51.0-FINAL` version of the `pom.xml` is created for the modules above. The modules contain the expected content. But the `pom.xml` is missing the signature. Another side effect is that the `1.0.1-SNAPSHOT` version of the modules above is not created anymore as the `signing` block is now added to the module.

In 1.0.0 more modules have been relocated. They need to be added as well when it is clear how this should be approached.
  • Loading branch information
paul-dingemans committed Sep 28, 2023
1 parent a679dd4 commit 80b08eb
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ktlint-cli-reporter-baseline/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,26 @@ dependencies {

testImplementation(projects.ktlintTest)
}

publishing {
publications {
// TODO: Remove in release after ktlint 1.0.1
create<MavenPublication>("relocation-ktlint-cli-reporter-baseline") {
pom {
// Old artifact coordinates
groupId = "com.pinterest.ktlint"
artifactId = "ktlint-reporter-baseline"
version = "0.51.0-FINAL"

distributionManagement {
relocation {
// New artifact coordinates
artifactId.set("ktlint-cli-reporter-baseline")
version.set("1.0.0")
message.set("artifactId has been changed")
}
}
}
}
}
}
24 changes: 24 additions & 0 deletions ktlint-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,27 @@ sdkman {
url.set("https://github.com/pinterest/ktlint/releases/download/$sdkmanVersion/ktlint-$sdkmanVersion.zip")
hashtag.set("ktlint")
}

publishing {
publications {
// TODO: Remove in release after ktlint 1.0.1
create<MavenPublication>("relocation-ktlint-cli") {
pom {
// Old artifact coordinates ktlint-cli
groupId = "com.pinterest"
artifactId = "ktlint"
version = "0.51.0-FINAL"

distributionManagement {
relocation {
// New artifact coordinates
groupId.set("com.pinterest.ktlint")
artifactId.set("ktlint-cli")
version.set("1.0.0")
message.set("groupId and artifactId have been changed")
}
}
}
}
}
}

0 comments on commit 80b08eb

Please sign in to comment.