diff --git a/buildSrc/src/main/kotlin/dev/freya02/botcommands/plugins/PublishedProjectEnvironmentConfig.kt b/buildSrc/src/main/kotlin/dev/freya02/botcommands/plugins/PublishedProjectEnvironmentConfig.kt index 2b19415a8..ad0890109 100644 --- a/buildSrc/src/main/kotlin/dev/freya02/botcommands/plugins/PublishedProjectEnvironmentConfig.kt +++ b/buildSrc/src/main/kotlin/dev/freya02/botcommands/plugins/PublishedProjectEnvironmentConfig.kt @@ -87,8 +87,10 @@ abstract class PublishedProjectEnvironmentConfig( } project.extensions.configure("mavenPublishing") { - // Publish empty JAR if the project has no API, and thus no docs - if (dokkaExtension == null) { + // Publish empty JAR + // if the project has no API, and thus no docs, + // or, we are publishing a snapshot (wasted disk space and CI time imo) + if (dokkaExtension == null || canPublishSnapshot) { configure(KotlinJvm(javadocJar = JavadocJar.Empty())) }