From ae27847267b752eda32c4559293c5ac33b5da022 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 14 Feb 2021 00:01:08 +0100 Subject: [PATCH] Upgrade dokka to 1.4.20. Configure javadoc artifacts for Maven Central publicaiton. --- build.gradle.kts | 217 ++++++------------ gradle.properties | 2 +- .../kvision-bootstrap-css/build.gradle.kts | 8 + .../build.gradle.kts | 8 + .../kvision-bootstrap-dialog/build.gradle.kts | 8 + .../build.gradle.kts | 8 + .../kvision-bootstrap-select/build.gradle.kts | 8 + .../build.gradle.kts | 8 + .../build.gradle.kts | 8 + .../build.gradle.kts | 8 + .../kvision-bootstrap-upload/build.gradle.kts | 8 + .../kvision-bootstrap/build.gradle.kts | 8 + .../kvision-chart/build.gradle.kts | 8 + .../build.gradle.kts | 8 + .../kvision-common-remote/build.gradle.kts | 8 + .../kvision-common-types/build.gradle.kts | 8 + .../kvision-cordova/build.gradle.kts | 8 + .../kvision-datacontainer/build.gradle.kts | 8 + .../kvision-electron/build.gradle.kts | 8 + .../kvision-event-flow/build.gradle.kts | 8 + .../kvision-fontawesome/build.gradle.kts | 8 + .../kvision-handlebars/build.gradle.kts | 8 + kvision-modules/kvision-i18n/build.gradle.kts | 8 + kvision-modules/kvision-maps/build.gradle.kts | 8 + .../kvision-moment/build.gradle.kts | 8 + .../kvision-onsenui-css/build.gradle.kts | 8 + .../kvision-onsenui/build.gradle.kts | 8 + kvision-modules/kvision-pace/build.gradle.kts | 8 + .../kvision-print/build.gradle.kts | 8 + .../kvision-react/build.gradle.kts | 8 + .../kvision-redux-kotlin/build.gradle.kts | 8 + .../kvision-redux/build.gradle.kts | 8 + .../kvision-richtext/build.gradle.kts | 8 + .../kvision-server-javalin/build.gradle.kts | 8 + .../kvision-server-jooby/build.gradle.kts | 8 + .../kvision-server-ktor/build.gradle.kts | 8 + .../kvision-server-micronaut/build.gradle.kts | 8 + .../build.gradle.kts | 8 + .../kvision-server-vertx/build.gradle.kts | 8 + .../kvision-tabulator-remote/build.gradle.kts | 8 + .../kvision-tabulator/build.gradle.kts | 8 + .../kvision-testutils/build.gradle.kts | 1 + .../kvision-toast/build.gradle.kts | 8 + .../kvision-compiler-plugin/build.gradle.kts | 8 + .../kvision-gradle-plugin/build.gradle.kts | 8 + 45 files changed, 408 insertions(+), 148 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b4b856a8c33..98aeda0d89b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -71,11 +71,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } @@ -86,158 +93,74 @@ publishing { setupSigning() setupPublication() -tasks.dokkaHtml { - outputDirectory = "$buildDir/kdoc" +/*tasks.dokkaHtml.configure { + outputDirectory.set(buildDir.resolve("kdoc")) dokkaSourceSets { register("kvision") { - includes = listOf("Module.md") - displayName = "JS" - platform = "js" - includeNonPublic = false - skipDeprecated = false - reportUndocumented = false - this.sourceRoot { - this.path = "src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-css/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-datetime/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-dialog/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-select/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-spinner/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-typeahead/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-typeahead-remote/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-bootstrap-upload/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-chart/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-chart/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-common-remote/src/jsMain/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-common-types/src/jsMain/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-cordova/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-datacontainer/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-electron/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-event-flow/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-fontawesome/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-handlebars/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-i18n/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-maps/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-moment/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-onsenui/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-onsenui-css/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-pace/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-print/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-react/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-redux/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-richtext/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-server-ktor/src/jsMain/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-tabulator/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-tabulator-remote/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-testutils/src/main/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-toast/src/main/kotlin" - } + includes.from("Module.md") + displayName.set("JS") + platform.set(org.jetbrains.dokka.Platform.js) + includeNonPublic.set(false) + skipDeprecated.set(false) + reportUndocumented.set(false) + sourceRoots.from(file("src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-css/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-datetime/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-dialog/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-select/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-spinner/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-typeahead/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-typeahead-remote/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-bootstrap-upload/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-chart/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-chart/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-common-remote/src/jsMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-common-types/src/jsMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-cordova/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-datacontainer/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-electron/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-event-flow/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-fontawesome/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-handlebars/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-i18n/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-maps/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-moment/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-onsenui/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-onsenui-css/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-pace/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-react/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-redux/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-richtext/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-server-ktor/src/jsMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-tabulator/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-tabulator-remote/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-testutils/src/main/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-toast/src/main/kotlin")) } register("kvision-common") { - includes = listOf("Module.md") - displayName = "Common" - platform = "common" - includeNonPublic = false - skipDeprecated = false - reportUndocumented = false - this.sourceRoot { - this.path = "kvision-modules/kvision-common-annotations/src/commonMain/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-common-remote/src/commonMain/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-common-types/src/commonMain/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-server-ktor/src/commonMain/kotlin" - } + includes.from("Module.md") + displayName.set("Common") + platform.set(org.jetbrains.dokka.Platform.common) + includeNonPublic.set(false) + skipDeprecated.set(false) + reportUndocumented.set(false) + sourceRoots.from(file("kvision-modules/kvision-common-annotations/src/commonMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-common-remote/src/commonMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-common-types/src/commonMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-server-ktor/src/commonMain/kotlin")) } register("kvision-jvm") { - includes = listOf("Module.md") - displayName = "JVM" - platform = "jvm" - includeNonPublic = false - skipDeprecated = false - reportUndocumented = false - this.sourceRoot { - this.path = "kvision-modules/kvision-common-types/src/jvmMain/kotlin" - } - this.sourceRoot { - this.path = "kvision-modules/kvision-server-ktor/src/jvmMain/kotlin" - } + includes.from("Module.md") + displayName.set("JVM") + platform.set(org.jetbrains.dokka.Platform.jvm) + includeNonPublic.set(false) + skipDeprecated.set(false) + reportUndocumented.set(false) + sourceRoots.from(file("kvision-modules/kvision-common-remote/src/jvmMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-common-types/src/jvmMain/kotlin")) + sourceRoots.from(file("kvision-modules/kvision-server-ktor/src/jvmMain/kotlin")) } } -} +}*/ diff --git a/gradle.properties b/gradle.properties index f158dab3ae5..2e38dec4b37 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ systemProp.kotlinVersion=1.4.30 javaVersion=1.8 coroutinesVersion=1.4.2 serializationVersion=1.1.0-RC -systemProp.dokkaVersion=1.4.0-rc +systemProp.dokkaVersion=1.4.20 joobyVersion=2.9.5 springBootVersion=2.4.2 ktorVersion=1.5.1 diff --git a/kvision-modules/kvision-bootstrap-css/build.gradle.kts b/kvision-modules/kvision-bootstrap-css/build.gradle.kts index 25a19b61073..daf13d3d082 100644 --- a/kvision-modules/kvision-bootstrap-css/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-css/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-datetime/build.gradle.kts b/kvision-modules/kvision-bootstrap-datetime/build.gradle.kts index 96b697c6c23..06915fc065e 100644 --- a/kvision-modules/kvision-bootstrap-datetime/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-datetime/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -22,11 +23,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-dialog/build.gradle.kts b/kvision-modules/kvision-bootstrap-dialog/build.gradle.kts index 21447f9525e..988347163cc 100644 --- a/kvision-modules/kvision-bootstrap-dialog/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-dialog/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -24,11 +25,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-select-remote/build.gradle.kts b/kvision-modules/kvision-bootstrap-select-remote/build.gradle.kts index 11b170fb872..cc0fe89ff7e 100644 --- a/kvision-modules/kvision-bootstrap-select-remote/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-select-remote/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -25,11 +26,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-select/build.gradle.kts b/kvision-modules/kvision-bootstrap-select/build.gradle.kts index 95cf761b722..110c3baa345 100644 --- a/kvision-modules/kvision-bootstrap-select/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-select/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -22,11 +23,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts b/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts index 51eba9f5106..642ab2fe8d5 100644 --- a/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-spinner/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-typeahead-remote/build.gradle.kts b/kvision-modules/kvision-bootstrap-typeahead-remote/build.gradle.kts index fa906c94dd0..dbe3e0cc3c4 100644 --- a/kvision-modules/kvision-bootstrap-typeahead-remote/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-typeahead-remote/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-typeahead/build.gradle.kts b/kvision-modules/kvision-bootstrap-typeahead/build.gradle.kts index dac3e37efc5..8553cc193a6 100644 --- a/kvision-modules/kvision-bootstrap-typeahead/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-typeahead/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap-upload/build.gradle.kts b/kvision-modules/kvision-bootstrap-upload/build.gradle.kts index 13e28d56e6f..97c1562f36d 100644 --- a/kvision-modules/kvision-bootstrap-upload/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap-upload/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } val coroutinesVersion: String by project @@ -26,11 +27,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-bootstrap/build.gradle.kts b/kvision-modules/kvision-bootstrap/build.gradle.kts index b160e64a418..44997e4e59f 100644 --- a/kvision-modules/kvision-bootstrap/build.gradle.kts +++ b/kvision-modules/kvision-bootstrap/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -24,11 +25,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-chart/build.gradle.kts b/kvision-modules/kvision-chart/build.gradle.kts index 057d8edc8bd..b552fd2f892 100644 --- a/kvision-modules/kvision-chart/build.gradle.kts +++ b/kvision-modules/kvision-chart/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-common-annotations/build.gradle.kts b/kvision-modules/kvision-common-annotations/build.gradle.kts index 0b941eb404f..5e0885c763a 100644 --- a/kvision-modules/kvision-common-annotations/build.gradle.kts +++ b/kvision-modules/kvision-common-annotations/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -28,9 +29,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-common-annotations" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-common-remote/build.gradle.kts b/kvision-modules/kvision-common-remote/build.gradle.kts index 3f1c5cb7d95..beafa71f454 100644 --- a/kvision-modules/kvision-common-remote/build.gradle.kts +++ b/kvision-modules/kvision-common-remote/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -46,9 +47,16 @@ tasks.withType { useTestNG() } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-common-remote" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-common-types/build.gradle.kts b/kvision-modules/kvision-common-types/build.gradle.kts index 74f1778a33c..c0aaccca781 100644 --- a/kvision-modules/kvision-common-types/build.gradle.kts +++ b/kvision-modules/kvision-common-types/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -29,9 +30,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-common-types" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-cordova/build.gradle.kts b/kvision-modules/kvision-cordova/build.gradle.kts index f263b2a724e..e137e4c99c0 100644 --- a/kvision-modules/kvision-cordova/build.gradle.kts +++ b/kvision-modules/kvision-cordova/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -23,11 +24,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-datacontainer/build.gradle.kts b/kvision-modules/kvision-datacontainer/build.gradle.kts index 11af05f98d3..48e41d95d31 100644 --- a/kvision-modules/kvision-datacontainer/build.gradle.kts +++ b/kvision-modules/kvision-datacontainer/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-electron/build.gradle.kts b/kvision-modules/kvision-electron/build.gradle.kts index 69f047544b0..340c7b583d6 100644 --- a/kvision-modules/kvision-electron/build.gradle.kts +++ b/kvision-modules/kvision-electron/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -35,11 +36,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-event-flow/build.gradle.kts b/kvision-modules/kvision-event-flow/build.gradle.kts index f263b2a724e..e137e4c99c0 100644 --- a/kvision-modules/kvision-event-flow/build.gradle.kts +++ b/kvision-modules/kvision-event-flow/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -23,11 +24,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-fontawesome/build.gradle.kts b/kvision-modules/kvision-fontawesome/build.gradle.kts index 0df01ae041b..c7beb35deab 100644 --- a/kvision-modules/kvision-fontawesome/build.gradle.kts +++ b/kvision-modules/kvision-fontawesome/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-handlebars/build.gradle.kts b/kvision-modules/kvision-handlebars/build.gradle.kts index ff5d1f24b64..ac24cbee558 100644 --- a/kvision-modules/kvision-handlebars/build.gradle.kts +++ b/kvision-modules/kvision-handlebars/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-i18n/build.gradle.kts b/kvision-modules/kvision-i18n/build.gradle.kts index dd75b49a306..18b0a9c6202 100644 --- a/kvision-modules/kvision-i18n/build.gradle.kts +++ b/kvision-modules/kvision-i18n/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -19,11 +20,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-maps/build.gradle.kts b/kvision-modules/kvision-maps/build.gradle.kts index 910ca1eb6c8..09a9ee74ed2 100644 --- a/kvision-modules/kvision-maps/build.gradle.kts +++ b/kvision-modules/kvision-maps/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } val coroutinesVersion: String by project @@ -23,11 +24,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-moment/build.gradle.kts b/kvision-modules/kvision-moment/build.gradle.kts index ad16f1938e8..c5477437163 100644 --- a/kvision-modules/kvision-moment/build.gradle.kts +++ b/kvision-modules/kvision-moment/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-onsenui-css/build.gradle.kts b/kvision-modules/kvision-onsenui-css/build.gradle.kts index 97ed0944de5..ebd63a2ae0f 100644 --- a/kvision-modules/kvision-onsenui-css/build.gradle.kts +++ b/kvision-modules/kvision-onsenui-css/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-onsenui/build.gradle.kts b/kvision-modules/kvision-onsenui/build.gradle.kts index 9c369536fb4..6d9bfc1d74f 100644 --- a/kvision-modules/kvision-onsenui/build.gradle.kts +++ b/kvision-modules/kvision-onsenui/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-pace/build.gradle.kts b/kvision-modules/kvision-pace/build.gradle.kts index b85b52aea81..4b6e07d66e6 100644 --- a/kvision-modules/kvision-pace/build.gradle.kts +++ b/kvision-modules/kvision-pace/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-print/build.gradle.kts b/kvision-modules/kvision-print/build.gradle.kts index 7ac6e20da84..07cc8499467 100644 --- a/kvision-modules/kvision-print/build.gradle.kts +++ b/kvision-modules/kvision-print/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-react/build.gradle.kts b/kvision-modules/kvision-react/build.gradle.kts index 1e6bbe110bf..8737c5a83b7 100644 --- a/kvision-modules/kvision-react/build.gradle.kts +++ b/kvision-modules/kvision-react/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } val kotlinReactVersion: String by project @@ -26,11 +27,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-redux-kotlin/build.gradle.kts b/kvision-modules/kvision-redux-kotlin/build.gradle.kts index 04497409be8..efc44cb271c 100644 --- a/kvision-modules/kvision-redux-kotlin/build.gradle.kts +++ b/kvision-modules/kvision-redux-kotlin/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -26,11 +27,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-redux/build.gradle.kts b/kvision-modules/kvision-redux/build.gradle.kts index 0f1359326aa..96f8c700768 100644 --- a/kvision-modules/kvision-redux/build.gradle.kts +++ b/kvision-modules/kvision-redux/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } val kotlinReduxVersion: String by project @@ -27,11 +28,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-richtext/build.gradle.kts b/kvision-modules/kvision-richtext/build.gradle.kts index f789f7bd485..948d44ac639 100644 --- a/kvision-modules/kvision-richtext/build.gradle.kts +++ b/kvision-modules/kvision-richtext/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-server-javalin/build.gradle.kts b/kvision-modules/kvision-server-javalin/build.gradle.kts index dc652078b65..0c9e8aac6da 100644 --- a/kvision-modules/kvision-server-javalin/build.gradle.kts +++ b/kvision-modules/kvision-server-javalin/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -46,9 +47,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-server-javalin" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-server-jooby/build.gradle.kts b/kvision-modules/kvision-server-jooby/build.gradle.kts index 8e9d80f51a2..1b2f7d29cde 100644 --- a/kvision-modules/kvision-server-jooby/build.gradle.kts +++ b/kvision-modules/kvision-server-jooby/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -43,9 +44,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-server-jooby" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-server-ktor/build.gradle.kts b/kvision-modules/kvision-server-ktor/build.gradle.kts index fc4ab98faa7..fc236153337 100644 --- a/kvision-modules/kvision-server-ktor/build.gradle.kts +++ b/kvision-modules/kvision-server-ktor/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -46,9 +47,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-server-ktor" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-server-micronaut/build.gradle.kts b/kvision-modules/kvision-server-micronaut/build.gradle.kts index e4b7cf06e68..35fa96c3c34 100644 --- a/kvision-modules/kvision-server-micronaut/build.gradle.kts +++ b/kvision-modules/kvision-server-micronaut/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") kotlin("kapt") } @@ -56,9 +57,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-server-micronaut" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-server-spring-boot/build.gradle.kts b/kvision-modules/kvision-server-spring-boot/build.gradle.kts index dd2623460b7..2c446355b97 100644 --- a/kvision-modules/kvision-server-spring-boot/build.gradle.kts +++ b/kvision-modules/kvision-server-spring-boot/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -47,9 +48,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-server-spring-boot" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-server-vertx/build.gradle.kts b/kvision-modules/kvision-server-vertx/build.gradle.kts index 542ac182ea4..fad9ee978e8 100644 --- a/kvision-modules/kvision-server-vertx/build.gradle.kts +++ b/kvision-modules/kvision-server-vertx/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } // Versions @@ -47,9 +48,16 @@ kotlin { } } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications.withType { if (name == "kotlinMultiplatform") artifactId = "kvision-server-vertx" + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-tabulator-remote/build.gradle.kts b/kvision-modules/kvision-tabulator-remote/build.gradle.kts index 8c740b520d9..ea728f0e490 100644 --- a/kvision-modules/kvision-tabulator-remote/build.gradle.kts +++ b/kvision-modules/kvision-tabulator-remote/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-tabulator/build.gradle.kts b/kvision-modules/kvision-tabulator/build.gradle.kts index 07e6b98d595..a95c4cfe408 100644 --- a/kvision-modules/kvision-tabulator/build.gradle.kts +++ b/kvision-modules/kvision-tabulator/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -21,11 +22,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-modules/kvision-testutils/build.gradle.kts b/kvision-modules/kvision-testutils/build.gradle.kts index d6842190362..fbd7d238f62 100644 --- a/kvision-modules/kvision-testutils/build.gradle.kts +++ b/kvision-modules/kvision-testutils/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { diff --git a/kvision-modules/kvision-toast/build.gradle.kts b/kvision-modules/kvision-toast/build.gradle.kts index f2f07fa6874..035950722d3 100644 --- a/kvision-modules/kvision-toast/build.gradle.kts +++ b/kvision-modules/kvision-toast/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } kotlin { @@ -20,11 +21,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-tools/kvision-compiler-plugin/build.gradle.kts b/kvision-tools/kvision-compiler-plugin/build.gradle.kts index e3bfaf54850..88ad422b124 100644 --- a/kvision-tools/kvision-compiler-plugin/build.gradle.kts +++ b/kvision-tools/kvision-compiler-plugin/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } val mpaptRuntimeVersion: String by project @@ -18,11 +19,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() } diff --git a/kvision-tools/kvision-gradle-plugin/build.gradle.kts b/kvision-tools/kvision-gradle-plugin/build.gradle.kts index b939de09d74..619700b5d20 100644 --- a/kvision-tools/kvision-gradle-plugin/build.gradle.kts +++ b/kvision-tools/kvision-gradle-plugin/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id("maven-publish") id("signing") id("de.marcphilipp.nexus-publish") + id("org.jetbrains.dokka") } val kotlinVersion: String by System.getProperties() @@ -29,11 +30,18 @@ val sourcesJar by tasks.registering(Jar::class) { from(kotlin.sourceSets.main.get().kotlin) } +val javadocJar by tasks.registering(Jar::class) { + dependsOn("dokkaHtml") + archiveClassifier.set("javadoc") + from("$buildDir/dokka/html") +} + publishing { publications { create("kotlin") { from(components["kotlin"]) artifact(tasks["sourcesJar"]) + if (!hasProperty("SNAPSHOT")) artifact(tasks["javadocJar"]) pom { defaultPom() }