From d3a8d4073a21b08697e66a22b9fa20d89082c767 Mon Sep 17 00:00:00 2001 From: therealbush Date: Sat, 23 Apr 2022 16:55:12 -0700 Subject: take 3 --- build.gradle.kts | 32 +++++++++----------------------- gradle.properties | 1 + 2 files changed, 10 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 { kotlinOptions.jvmTarget = "1.8" } -val dokkaJavadocJar by tasks.register("dokkaJavadocJar") { - dependsOn(tasks.dokkaJavadoc) - from(tasks.dokkaJavadoc.flatMap { it.outputDirectory }) - archiveClassifier.set("javadoc") -} - -val dokkaHtmlJar by tasks.register("dokkaHtmlJar") { - dependsOn(tasks.dokkaHtml) - from(tasks.dokkaHtml.flatMap { it.outputDirectory }) - archiveClassifier.set("html-doc") +val javadocJar = tasks.named("javadocJar") { + from(tasks.named("dokkaJavadoc")) } -publishing.publications.create("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("maven").from(components["java"]) diff --git a/gradle.properties b/gradle.properties index 7fc6f1f..d49d818 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ kotlin.code.style=official +org.gradle.jvmargs=-Xmx3G -- cgit