Skip to content

Commit f4c4424

Browse files
committed
Publish via the Central Publisher Portal
1 parent 0d2667b commit f4c4424

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

.github/workflows/release_to_maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: ./gradlew clean build
4343

4444
- name: Publish package
45-
run: ./gradlew publishToSonatype closeSonatypeStagingRepository
45+
run: ./gradlew publishToSonatype
4646
env:
4747
SONATYPE_USERNAME: ${{ secrets.NEXUS_USERNAME }}
4848
SONATYPE_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

build.gradle.kts

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id("java-library")
3-
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
3+
id("eu.kakde.gradle.sonatype-maven-central-publisher") version "1.0.6"
44
id("maven-publish")
55
id("signing")
66
}
@@ -75,13 +75,42 @@ publishing {
7575
}
7676
}
7777

78-
nexusPublishing {
79-
repositories {
80-
sonatype {
81-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
82-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
83-
username.set(sonatypeUsername)
84-
password.set(sonatypePassword)
78+
sonatypeCentralPublishExtension {
79+
groupId.set(project.group.toString())
80+
artifactId.set("keepassxc-proxy-access")
81+
version.set(project.version.toString())
82+
componentType.set("java")
83+
publishingType.set("USER_MANAGED")
84+
85+
username.set(sonatypeUsername)
86+
password.set(sonatypePassword)
87+
88+
// Configure POM metadata
89+
pom {
90+
name.set("keepassxc-proxy-access")
91+
description.set("A Java library to access KeePassXC via its build-in proxy.")
92+
url.set("https://github.com/purejava/keepassxc-proxy-access")
93+
licenses {
94+
license {
95+
name.set("MIT License")
96+
url.set("https://opensource.org/licenses/MIT")
97+
}
98+
}
99+
developers {
100+
developer {
101+
id.set("purejava")
102+
name.set("Ralph Plawetzki")
103+
email.set("[email protected]")
104+
}
105+
}
106+
scm {
107+
connection.set("scm:git:git://github.com/purejava/keepassxc-proxy-access.git")
108+
developerConnection.set("scm:git:ssh://github.com/purejava/keepassxc-proxy-access.git")
109+
url.set("https://github.com/purejava/keepassxc-proxy-access/tree/main")
110+
}
111+
issueManagement {
112+
system.set("GitHub Issues")
113+
url.set("https://github.com/purejava/keepassxc-proxy-access/issues")
85114
}
86115
}
87116
}

0 commit comments

Comments
 (0)