diff options
author | therealbush <therealbush@users.noreply.github.com> | 2022-04-23 18:04:29 -0700 |
---|---|---|
committer | therealbush <therealbush@users.noreply.github.com> | 2022-04-23 18:04:29 -0700 |
commit | 1b04f291f712e011472c320585f39311ab0f7cf7 (patch) | |
tree | de31e2501c4381512b52d3d63ebd79680bef4575 | |
parent | d3a8d4073a21b08697e66a22b9fa20d89082c767 (diff) | |
download | eventbus-kotlin-1b04f291f712e011472c320585f39311ab0f7cf7.tar.gz eventbus-kotlin-1b04f291f712e011472c320585f39311ab0f7cf7.tar.bz2 eventbus-kotlin-1b04f291f712e011472c320585f39311ab0f7cf7.zip |
cleaner gradle
-rw-r--r-- | build.gradle.kts | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 86f617a..04d15ad 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,9 +1,8 @@ -import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id("java") - id("maven-publish") + java + `maven-publish` kotlin("jvm") version "1.6.20" id("org.jetbrains.dokka") version "1.6.20" } @@ -16,13 +15,12 @@ repositories.mavenCentral() dependencies { testImplementation(kotlin("test")) - // 2.15.0 is not vulnerable to any RCE exploits. implementation("org.apache.logging.log4j:log4j-api:2.15.0") implementation("org.apache.logging.log4j:log4j-core:2.15.0") // Additional Kotlin libraries required for some features - implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.20") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1") + implementation(kotlin("reflect", "1.6.20")) + implementation(kotlin("coroutines-core", "1.6.1")) } java { @@ -30,17 +28,17 @@ java { withJavadocJar() } -tasks.test { - testLogging.showStandardStreams = true - useJUnitPlatform() -} - -tasks.withType<KotlinCompile> { - kotlinOptions.jvmTarget = "1.8" -} - -val javadocJar = tasks.named<Jar>("javadocJar") { - from(tasks.named("dokkaJavadoc")) +tasks { + test { + testLogging.showStandardStreams = true + useJUnitPlatform() + } + withType<KotlinCompile> { + kotlinOptions.jvmTarget = "1.8" + } + named<Jar>("javadocJar") { + from(named("dokkaJavadoc")) + } } publishing.publications.create<MavenPublication>("maven").from(components["java"]) |