Skip to content

Commit

Permalink
Gradle, dokka tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
elect86 committed Dec 14, 2020
1 parent bd17b4c commit 78ba2bd
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ dependencies {
}


//val sceneryName: String by project
//println("s: $sceneryName")

tasks {
withType<KotlinCompile>().all {
kotlinOptions {
Expand All @@ -122,4 +119,28 @@ tasks {
jar {
archiveVersion.set(rootProject.version.toString())
}
}

val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.get().outputDirectory.get())
archiveClassifier.set("javadoc")
}

val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
dependsOn(tasks.dokkaHtml)
from(tasks.dokkaHtml.get().outputDirectory.get())
archiveClassifier.set("html-doc")
}

val sourceJar = task("sourceJar", Jar::class) {
dependsOn(tasks.classes)
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

artifacts {
archives(dokkaJavadocJar)
archives(dokkaHtmlJar)
archives(sourceJar)
}

0 comments on commit 78ba2bd

Please sign in to comment.