aboutsummaryrefslogtreecommitdiff
path: root/examples/gradle/dokka-library-publishing-example/build.gradle.kts
diff options
context:
space:
mode:
authorvmishenev <vad-mishenev@yandex.ru>2021-07-28 14:57:38 +0300
committervmishenev <vad-mishenev@yandex.ru>2021-07-28 19:11:50 +0300
commitf03083d7534209ad94dc3c4d7afd17f58e58127d (patch)
tree8160e6e8d376fc16ad559cfa59048c5447d2e2bd /examples/gradle/dokka-library-publishing-example/build.gradle.kts
parent2cd95b0828518dde751d039f4456dcf93e04dfc1 (diff)
downloaddokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.tar.gz
dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.tar.bz2
dokka-f03083d7534209ad94dc3c4d7afd17f58e58127d.zip
Migrate Dokka examples to Dokka repo (KT-47798) (#2030)
* Migrate Dokka examples to Dokka repo (KT-47798) * Configure workflow of examples checking * Add workflow to deploy examples
Diffstat (limited to 'examples/gradle/dokka-library-publishing-example/build.gradle.kts')
-rw-r--r--examples/gradle/dokka-library-publishing-example/build.gradle.kts44
1 files changed, 44 insertions, 0 deletions
diff --git a/examples/gradle/dokka-library-publishing-example/build.gradle.kts b/examples/gradle/dokka-library-publishing-example/build.gradle.kts
new file mode 100644
index 00000000..1d94ae9e
--- /dev/null
+++ b/examples/gradle/dokka-library-publishing-example/build.gradle.kts
@@ -0,0 +1,44 @@
+plugins {
+ kotlin("jvm") version "1.4.32"
+ id("org.jetbrains.dokka") version ("1.4.32")
+ `java-library`
+ `maven-publish`
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation(kotlin("stdlib"))
+ testImplementation(kotlin("test-junit"))
+}
+
+val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
+ dependsOn(tasks.dokkaJavadoc)
+ from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
+ archiveClassifier.set("javadoc")
+}
+
+val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
+ dependsOn(tasks.dokkaHtml)
+ from(tasks.dokkaHtml.flatMap { it.outputDirectory })
+ archiveClassifier.set("html-doc")
+}
+
+publishing {
+ publications {
+ register<MavenPublication>("library") {
+ from(components["java"])
+ version = "1.0.0"
+ groupId = "demo"
+ artifactId = "dokka-library-publishing-example"
+ artifact(dokkaJavadocJar)
+ artifact(dokkaHtmlJar)
+ }
+ }
+}
+
+
+
+