From 71ab5d99246b60b7bcfcfa37e190acf5946c4171 Mon Sep 17 00:00:00 2001 From: stefankoppier Date: Sun, 22 Sep 2024 12:31:10 +0200 Subject: [PATCH] Empty jar workaround --- build.gradle.kts | 2 +- mappie-api/build.gradle.kts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6a69488f..e91948a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -71,7 +71,7 @@ jreleaser { stagingRepository(project(":mappie-api").layout.buildDirectory.dir("staging-deploy").get().toString()) username = properties["mavenCentralUsername"] as? String password = properties["mavenCentralPassword"] as? String - applyMavenCentralRules = false + applyMavenCentralRules = true verifyPom = false retryDelay = 20 } diff --git a/mappie-api/build.gradle.kts b/mappie-api/build.gradle.kts index 457f160c..9ebd3c20 100644 --- a/mappie-api/build.gradle.kts +++ b/mappie-api/build.gradle.kts @@ -57,6 +57,11 @@ tasks.register("javadocJar") { dependsOn(dokkaHtml) } +tasks.register("emptyJar") { + group = "build" + description = "Assemble an empty jar." +} + publishing { repositories { maven { @@ -66,7 +71,10 @@ publishing { publications.configureEach { if (this is MavenPublication) { - artifact(tasks["javadocJar"]) + // jreleaser workaround + if (name != "jvm" && name != "kotlinMultiplatform") { + artifact(tasks["emptyJar"]) + } pom { name = "tech.mappie:compiler-plugin" description = "Kotlin Compiler Plugin for generating object mappers"