From 1b04f291f712e011472c320585f39311ab0f7cf7 Mon Sep 17 00:00:00 2001 From: therealbush Date: Sat, 23 Apr 2022 18:04:29 -0700 Subject: cleaner gradle --- build.gradle.kts | 32 +++++++++++++++----------------- 1 file 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 { - kotlinOptions.jvmTarget = "1.8" -} - -val javadocJar = tasks.named("javadocJar") { - from(tasks.named("dokkaJavadoc")) +tasks { + test { + testLogging.showStandardStreams = true + useJUnitPlatform() + } + withType { + kotlinOptions.jvmTarget = "1.8" + } + named("javadocJar") { + from(named("dokkaJavadoc")) + } } publishing.publications.create("maven").from(components["java"]) -- cgit