diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts index 77b98f1a330..534d252b314 100644 --- a/bom/build.gradle.kts +++ b/bom/build.gradle.kts @@ -1,6 +1,6 @@ plugins { `java-platform` - `kord-publishing` + `maven-publish` } val me = project @@ -27,7 +27,9 @@ dependencies { } publishing { - publications.withType().configureEach { + publications.register(Library.name) { from(components["javaPlatform"]) } } + +apply(plugin = "kord-publishing") diff --git a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts index ef32826cb90..546502d228b 100644 --- a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts @@ -5,15 +5,18 @@ plugins { signing } -val dokkaJar by tasks.registering(Jar::class) { - archiveClassifier = "javadoc" - from(tasks.named("dokkaHtml")) -} +fun MavenPublication.registerDokkaJar() = + tasks.register("${name}DokkaJar") { + archiveClassifier = "javadoc" + destinationDirectory = destinationDirectory.get().dir(name) + from(tasks.named("dokkaHtml")) + } publishing { publications { withType().configureEach { - artifact(dokkaJar) + if (project.name != "bom") artifact(registerDokkaJar()) + groupId = Library.group artifactId = "kord-$artifactId" version = Library.version @@ -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) } }