Skip to content

Commit 884e5f7

Browse files
committed
WIP #2
1 parent c0125dd commit 884e5f7

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

build.gradle.kts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ uploadArchives {
175175
// ------------------------------------
176176
// PUBLISHING TO SONATYPE CONFIGURATION
177177
// ------------------------------------
178-
object Meta {
178+
object PublishMetaData {
179179
val COMPONENT_TYPE = "java" // "java" or "versionCatalog"
180180
val GROUP = project.group.toString()
181181
val ARTIFACT_ID = project.name
@@ -198,43 +198,43 @@ val sonatypePassword: String? by project // this is defined in ~/.gradle/gradle.
198198

199199
sonatypeCentralPublishExtension {
200200
// Set group ID, artifact ID, version, and other publication details
201-
groupId.set(Meta.GROUP)
202-
artifactId.set(Meta.ARTIFACT_ID)
203-
version.set(Meta.VERSION)
204-
componentType.set(Meta.COMPONENT_TYPE) // "java" or "versionCatalog"
205-
publishingType.set(Meta.PUBLISHING_TYPE) // USER_MANAGED or AUTOMATIC
201+
groupId.set(PublishMetaData.GROUP)
202+
artifactId.set(PublishMetaData.ARTIFACT_ID)
203+
version.set(PublishMetaData.VERSION)
204+
componentType.set(PublishMetaData.COMPONENT_TYPE) // "java" or "versionCatalog"
205+
publishingType.set(PublishMetaData.PUBLISHING_TYPE) // USER_MANAGED or AUTOMATIC
206206

207207
// Set username and password for Sonatype repository
208208
username.set(System.getenv("SONATYPE_USERNAME") ?: sonatypeUsername)
209209
password.set(System.getenv("SONATYPE_PASSWORD") ?: sonatypePassword)
210210

211211
// Configure POM metadata
212212
pom {
213-
name.set(Meta.ARTIFACT_ID)
214-
description.set(Meta.DESC)
215-
url.set(Meta.URL)
213+
name.set(PublishMetaData.ARTIFACT_ID)
214+
description.set(PublishMetaData.DESC)
215+
url.set(PublishMetaData.URL)
216216
licenses {
217217
license {
218-
name.set(Meta.LICENSE)
219-
url.set(Meta.LICENSE_URL)
218+
name.set(PublishMetaData.LICENSE)
219+
url.set(PublishMetaData.LICENSE_URL)
220220
}
221221
}
222222
developers {
223223
developer {
224-
id.set(Meta.DEVELOPER_ID)
225-
name.set(Meta.DEVELOPER_NAME)
226-
organization.set(Meta.DEVELOPER_ORGANIZATION)
227-
organizationUrl.set(Meta.DEVELOPER_ORGANIZATION_URL)
224+
id.set(PublishMetaData.DEVELOPER_ID)
225+
name.set(PublishMetaData.DEVELOPER_NAME)
226+
organization.set(PublishMetaData.DEVELOPER_ORGANIZATION)
227+
organizationUrl.set(PublishMetaData.DEVELOPER_ORGANIZATION_URL)
228228
}
229229
}
230230
scm {
231-
url.set("https://github.com/${Meta.GITHUB_REPO}")
232-
connection.set("scm:git:https://github.com/${Meta.GITHUB_REPO}")
233-
developerConnection.set("scm:git:https://github.com/${Meta.GITHUB_REPO}")
231+
url.set("https://github.com/${PublishMetaData.GITHUB_REPO}")
232+
connection.set("scm:git:https://github.com/${PublishMetaData.GITHUB_REPO}")
233+
developerConnection.set("scm:git:https://github.com/${PublishMetaData.GITHUB_REPO}")
234234
}
235235
issueManagement {
236236
system.set("GitHub")
237-
url.set("https://github.com/${Meta.GITHUB_REPO}/issues")
237+
url.set("https://github.com/${PublishMetaData.GITHUB_REPO}/issues")
238238
}
239239
}
240240
}

0 commit comments

Comments
 (0)