@@ -82,35 +82,56 @@ dependencies {
8282 integrationTestImplementation(" com.google.guava:guava:33.1.0-jre" )
8383}
8484
85+ fun libraryPom () = Action <MavenPom > {
86+ name.set(" Gradle Enterprise API Kotlin" )
87+ description.set(" A library to use the Gradle Enterprise REST API in Kotlin" )
88+ url.set(" https://github.com/gabrielfeo/gradle-enterprise-api-kotlin" )
89+ licenses {
90+ license {
91+ name.set(" MIT" )
92+ url.set(" https://spdx.org/licenses/MIT.html" )
93+ distribution.set(" repo" )
94+ }
95+ }
96+ developers {
97+ developer {
98+ id.set(" gabrielfeo" )
99+ name.set(" Gabriel Feo" )
100+ email.set(" gabriel@gabrielfeo.com" )
101+ }
102+ }
103+ scm {
104+ val basicUrl = " github.com/gabrielfeo/gradle-enterprise-api-kotlin"
105+ connection.set(" scm:git:git://$basicUrl .git" )
106+ developerConnection.set(" scm:git:ssh://$basicUrl .git" )
107+ url.set(" https://$basicUrl /" )
108+ }
109+ }
110+
85111publishing {
86112 publications {
87- create<MavenPublication >(" library " ) {
88- artifactId = " gradle-enterprise -api-kotlin"
113+ create<MavenPublication >(" develocityApiKotlin " ) {
114+ artifactId = " develocity -api-kotlin"
89115 from(components[" java" ])
116+ pom(libraryPom())
117+ }
118+ // For occasional maven local publishing
119+ create<MavenPublication >(" unsignedDevelocityApiKotlin" ) {
120+ artifactId = " develocity-api-kotlin"
121+ from(components[" java" ])
122+ pom(libraryPom())
123+ }
124+ create<MavenPublication >(" relocation" ) {
90125 pom {
91- name.set(" Gradle Enterprise API Kotlin" )
92- description.set(" A library to use the Gradle Enterprise REST API in Kotlin" )
93- url.set(" https://github.com/gabrielfeo/gradle-enterprise-api-kotlin" )
94- licenses {
95- license {
96- name.set(" MIT" )
97- url.set(" https://spdx.org/licenses/MIT.html" )
98- distribution.set(" repo" )
126+ groupId = project.group.toString()
127+ artifactId = " gradle-enterprise-api-kotlin"
128+ distributionManagement {
129+ relocation {
130+ groupId = project.group.toString()
131+ artifactId = " develocity-api-kotlin"
132+ message = " artifactId has been changed. Part of the rename to Develocity."
99133 }
100134 }
101- developers {
102- developer {
103- id.set(" gabrielfeo" )
104- name.set(" Gabriel Feo" )
105- email.set(" gabriel@gabrielfeo.com" )
106- }
107- }
108- scm {
109- val basicUrl = " github.com/gabrielfeo/gradle-enterprise-api-kotlin"
110- connection.set(" scm:git:git://$basicUrl .git" )
111- developerConnection.set(" scm:git:ssh://$basicUrl .git" )
112- url.set(" https://$basicUrl /" )
113- }
114135 }
115136 }
116137 }
@@ -135,7 +156,7 @@ publishing {
135156fun isCI () = System .getenv(" CI" ).toBoolean()
136157
137158signing {
138- sign(publishing.publications[" library " ])
159+ sign(publishing.publications[" develocityApiKotlin " ])
139160 if (isCI()) {
140161 useInMemoryPgpKeys(
141162 project.properties[" signing.secretKey" ] as String? ,
0 commit comments