Skip to content

Commit 3584641

Browse files
author
yweber
committed
simplified maven central publish
1 parent 75109ae commit 3584641

File tree

4 files changed

+11
-30
lines changed

4 files changed

+11
-30
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
run: ./graldew check
2020
- name: Publish to Maven Central
2121
env:
22-
SIGN_KEY: ${{ secrets.SIGN_KEY }}
23-
SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }}
24-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
25-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
26-
run: ./gradlew clean publishToSonatype closeAndReleaseSonatypeStagingRepository
22+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGN_KEY }}
23+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGN_KEY_PASS }}
24+
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
25+
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
26+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
2727

build.gradle.kts

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
id("com.github.sgtsilvio.gradle.metadata")
1010
id("com.github.sgtsilvio.gradle.javadoc-links")
1111
id("io.github.gradle-nexus.publish-plugin")
12-
signing
12+
id("signing")
1313
}
1414

1515

@@ -114,37 +114,18 @@ tasks.javadoc {
114114
publishing {
115115
publications.register<MavenPublication>("kafkaExtensionCustomizationSdk") {
116116
from(components["java"])
117-
pom {
118-
name.set(project.name)
119-
description.set(project.description)
120-
url.set(project.metadata.organization!!.url)
121-
licenses {
122-
project.metadata.license
123-
}
124-
developers {
125-
project.metadata.developers
126-
}
127-
scm {
128-
connection.set("scm:git:git://github.com/hivemq/${project.metadata.github!!.repo}.git")
129-
developerConnection.set("scm:git:ssh://github.com/hivemq/${project.metadata.github!!.repo}.git")
130-
url.set("http://github.com/hivemq/${project.metadata.github!!.repo}/")
131-
}
132-
}
133117
}
134118
}
135119

136120
nexusPublishing {
137121
repositories {
138-
sonatype {
139-
username.set("${project.findProperty("sonatypeUser") ?: System.getenv("SONATYPE_USERNAME")}")
140-
password.set("${project.findProperty("sonatypePassword") ?: System.getenv("SONATYPE_PASSWORD")}")
141-
}
122+
sonatype ()
142123
}
143124
}
144125

145126
signing {
146-
val signingKey = "${project.findProperty("signingKey") ?: System.getenv("SIGN_KEY")}";
147-
val signingPassword = "${project.findProperty("signingPassword") ?: System.getenv("SIGN_KEY_PASS")}";
127+
val signingKey = "${project.findProperty("signingKey")}"
128+
val signingPassword = "${project.findProperty("signingPassword")}"
148129
useInMemoryPgpKeys(signingKey, signingPassword)
149130
sign(publishing.publications["kafkaExtensionCustomizationSdk"])
150131
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ plugin.bintray.version=1.8.5
1111
plugin.utf8.version=0.1.0
1212
plugin.metadata.version=0.2.0
1313
plugin.javadoc-links.version=0.3.0
14-
plugin.io.github.gradle-nexus.publish-plugin.version=1.0.0
14+
plugin.nexus-publish.version=1.0.0

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pluginManagement {
77
id("com.github.sgtsilvio.gradle.utf8") version "${extra["plugin.utf8.version"]}"
88
id("com.github.sgtsilvio.gradle.metadata") version "${extra["plugin.metadata.version"]}"
99
id("com.github.sgtsilvio.gradle.javadoc-links") version "${extra["plugin.javadoc-links.version"]}"
10-
id("io.github.gradle-nexus.publish-plugin") version "${extra["plugin.io.github.gradle-nexus.publish-plugin.version"]}"
10+
id("io.github.gradle-nexus.publish-plugin") version "${extra["plugin.nexus-publish.version"]}"
1111
}
1212
}
1313

0 commit comments

Comments
 (0)