From 55716b58b6aae8fa45fb82fbfec24ced4419187f Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 10 May 2021 14:30:35 +0200 Subject: build: Publish Java Platform on Maven Central This change updates the build configuration to also publish the Java Platform on Maven Central. This is necessary since the other modules depend on the platform. --- .../main/kotlin/kotlin-library-conventions.gradle.kts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts') diff --git a/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts index 296d5967..8fd45a41 100644 --- a/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts @@ -34,3 +34,19 @@ java { kotlin { explicitApi() } + +val javadocJar by tasks.registering(Jar::class) { + // Note that we publish the Dokka HTML artifacts as Javadoc + dependsOn(tasks.dokkaHtml) + archiveClassifier.set("javadoc") + from(tasks.dokkaHtml) +} + +configure { + publications { + named("maven") { + from(components["java"]) + artifact(javadocJar) + } + } +} -- cgit v1.2.3