diff options
author | therealbush <therealbush@users.noreply.github.com> | 2022-04-23 16:18:23 -0700 |
---|---|---|
committer | therealbush <therealbush@users.noreply.github.com> | 2022-04-23 16:18:23 -0700 |
commit | a6b58667dd3fd180595b478fe9d85d06a7c96f3e (patch) | |
tree | 8a64422510d2f239e75c6bf3bf8c642e5ac2b785 | |
parent | adc29fb685307385cfa9ebb813ad2bfb18bb7776 (diff) | |
download | eventbus-kotlin-a6b58667dd3fd180595b478fe9d85d06a7c96f3e.tar.gz eventbus-kotlin-a6b58667dd3fd180595b478fe9d85d06a7c96f3e.tar.bz2 eventbus-kotlin-a6b58667dd3fd180595b478fe9d85d06a7c96f3e.zip |
gradle changes
-rw-r--r-- | build.gradle.kts | 37 | ||||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.properties | 2 | ||||
-rw-r--r-- | settings.gradle.kts | 4 |
3 files changed, 33 insertions, 10 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index f65f62d..18cb877 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,15 +1,16 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { + id("java") + id("maven-publish") kotlin("jvm") version "1.6.20" + id("org.jetbrains.dokka") version "1.6.20" } group = "me.bush" version = "1.0.0" -repositories { - mavenCentral() -} +repositories.mavenCentral() dependencies { testImplementation(kotlin("test")) @@ -24,12 +25,36 @@ dependencies { } tasks.test { - testLogging { - showStandardStreams = true - } + testLogging.showStandardStreams = true useJUnitPlatform() } 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") +} + +publishing.publications.register<MavenPublication>("library") { + from(components["java"]) + version = project.version as String + groupId = project.group as String + artifactId = rootProject.name + artifact(dokkaJavadocJar) + artifact(dokkaHtmlJar) +} + +java { + withSourcesJar() + withJavadocJar() +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 69a9715..2e6e589 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index 34a4660..81b2c15 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1 @@ - -rootProject.name = "eventbuskotlin" - +rootProject.name = "eventbus-kotlin" |