diff options
author | therealbush <therealbush@users.noreply.github.com> | 2022-04-23 16:55:12 -0700 |
---|---|---|
committer | therealbush <therealbush@users.noreply.github.com> | 2022-04-23 16:55:12 -0700 |
commit | d3a8d4073a21b08697e66a22b9fa20d89082c767 (patch) | |
tree | 8303f40b95b792f0fc7237861534acc565b9dc8d /build.gradle.kts | |
parent | 5068f8d1f7ccebd75b0b5dc70200218304cbe2cd (diff) | |
download | eventbus-kotlin-d3a8d4073a21b08697e66a22b9fa20d89082c767.tar.gz eventbus-kotlin-d3a8d4073a21b08697e66a22b9fa20d89082c767.tar.bz2 eventbus-kotlin-d3a8d4073a21b08697e66a22b9fa20d89082c767.zip |
take 3
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index e0db575..86f617a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { @@ -24,6 +25,11 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1") } +java { + withSourcesJar() + withJavadocJar() +} + tasks.test { testLogging.showStandardStreams = true useJUnitPlatform() @@ -33,28 +39,8 @@ tasks.withType<KotlinCompile> { kotlinOptions.jvmTarget = "1.8" } -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") +val javadocJar = tasks.named<Jar>("javadocJar") { + from(tasks.named("dokkaJavadoc")) } -publishing.publications.create<MavenPublication>("maven") { - from(components["java"]) - version = project.version as String - groupId = project.group as String - artifactId = rootProject.name - artifact(dokkaJavadocJar) - artifact(dokkaHtmlJar) -} - -java { - withSourcesJar() - withJavadocJar() -} +publishing.publications.create<MavenPublication>("maven").from(components["java"]) |