Skip to content

Commit

Permalink
Make the artifact ID explicit rather than relying on implicit naming. (
Browse files Browse the repository at this point in the history
…#255)

* Make the artifact ID explicit rather than relying on implicit naming.

This allows naming the rootProject whatever we want. Improving developer experience in IDE for example.

* Set module name explicitly

* Set everything based on a central value.
  • Loading branch information
TWiStErRob authored Sep 1, 2023
1 parent b116c25 commit 2a18e12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins {
id("org.ajoberstar.stutter") version "0.7.2"
}

base { archivesName = "publish-plugin" }
group = "io.github.gradle-nexus"
version = "2.0.0-SNAPSHOT"

Expand Down Expand Up @@ -266,6 +267,7 @@ publishing {
publications {
afterEvaluate {
named<MavenPublication>("pluginMaven") {
artifactId = base.archivesName.get()
pom {
name = readableName
description = project.description
Expand All @@ -292,4 +294,3 @@ publishing {
}
}
}

4 changes: 1 addition & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ gradleEnterprise {
}
}

// this needs to stay this way since it's used as the plugin's artifact id
// for generating the plugin marker
rootProject.name = "publish-plugin"
rootProject.name = "gradle-nexus-publish-plugin"

0 comments on commit 2a18e12

Please sign in to comment.