Skip to content

Commit

Permalink
Fix signing
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann committed Apr 24, 2023
1 parent 5dee1b5 commit 5b3a7ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
6 changes: 4 additions & 2 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`java-platform`
`kord-publishing`
`maven-publish`
}

val me = project
Expand All @@ -27,7 +27,9 @@ dependencies {
}

publishing {
publications.withType<MavenPublication>().configureEach {
publications.register<MavenPublication>(Library.name) {
from(components["javaPlatform"])
}
}

apply(plugin = "kord-publishing")
15 changes: 9 additions & 6 deletions buildSrc/src/main/kotlin/kord-publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ plugins {
signing
}

val dokkaJar by tasks.registering(Jar::class) {
archiveClassifier = "javadoc"
from(tasks.named("dokkaHtml"))
}
fun MavenPublication.registerDokkaJar() =
tasks.register<Jar>("${name}DokkaJar") {
archiveClassifier = "javadoc"
destinationDirectory = destinationDirectory.get().dir(name)
from(tasks.named("dokkaHtml"))
}

publishing {
publications {
withType<MavenPublication>().configureEach {
artifact(dokkaJar)
if (project.name != "bom") artifact(registerDokkaJar())

groupId = Library.group
artifactId = "kord-$artifactId"
version = Library.version
Expand Down Expand Up @@ -76,6 +79,6 @@ if (!isJitPack && Library.isRelease) {
if (signingKey != null && signingPassword != null) {
useInMemoryPgpKeys(String(Base64.getDecoder().decode(signingKey)), signingPassword)
}
sign(publishing.publications[Library.name])
sign(publishing.publications)
}
}

0 comments on commit 5b3a7ef

Please sign in to comment.