switch to Groovy DSL

This commit is contained in:
2021-07-10 10:52:41 +01:00
parent b1b7142124
commit 8d4f654c0a
8 changed files with 128 additions and 111 deletions

42
cli/build.gradle Normal file
View File

@@ -0,0 +1,42 @@
plugins {
id "org.jetbrains.kotlin.jvm"
id "application"
}
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
dependencies {
implementation group:"org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: getProperty("kotlin.version")
implementation group: "org.apache.logging.log4j", name: "log4j-slf4j-impl", version: property("log4j.version")
implementation group: "org.slf4j", name: "slf4j-api", version: property("slf4j.version")
implementation group: "com.beust", name: "jcommander", version: property("jcommander.version")
implementation rootProject
testRuntimeOnly group: "org.junit.jupiter", name: "junit-jupiter-engine", version: property("junit.version")
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-api", version: property("junit.version")
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-params", version: property("junit.version")
}
application {
mainClassName = "net.woggioni.jzstd.Cli"
}
tasks.withType(Test) {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType(KotlinCompile.class).configureEach {
kotlinOptions {
languageVersion = "1.5"
apiVersion = "1.5"
jvmTarget = "1.8"
javaParameters = true
}
}

View File

@@ -1,48 +0,0 @@
plugins {
id("org.jetbrains.kotlin.jvm") version "1.4.10"
application
}
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun property(name : String) = project.property(name).toString()
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library.
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.apache.logging.log4j", "log4j-slf4j-impl", property("log4j.version"))
implementation("org.slf4j", "slf4j-api", property("slf4j.version"))
implementation("com.beust", "jcommander", property("jcommander.version"))
implementation(project(":"))
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", property("junit.version"))
testImplementation("org.junit.jupiter","junit-jupiter-api", property("junit.version"))
testImplementation("org.junit.jupiter","junit-jupiter-params", property("junit.version"))
}
application {
mainClassName = "net.woggioni.jzstd.Cli"
}
tasks.withType<Test> {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
languageVersion = "1.4"
apiVersion = "1.4"
jvmTarget = "1.8"
javaParameters = true // Useful for reflection.
}
}