Skip to content

Commit 0b74289

Browse files
authored
Publish empty Javadoc JARs for snapshots (#263)
1 parent c03a4dd commit 0b74289

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

buildSrc/src/main/kotlin/dev/freya02/botcommands/plugins/PublishedProjectEnvironmentConfig.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ abstract class PublishedProjectEnvironmentConfig(
8787
}
8888

8989
project.extensions.configure<MavenPublishBaseExtension>("mavenPublishing") {
90-
// Publish empty JAR if the project has no API, and thus no docs
91-
if (dokkaExtension == null) {
90+
// Publish empty JAR
91+
// if the project has no API, and thus no docs,
92+
// or, we are publishing a snapshot (wasted disk space and CI time imo)
93+
if (dokkaExtension == null || canPublishSnapshot) {
9294
configure(KotlinJvm(javadocJar = JavadocJar.Empty()))
9395
}
9496

0 commit comments

Comments
 (0)