-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
61 lines (51 loc) · 1.39 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
plugins {
kotlin("jvm") version "1.6.10"
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
application
}
group = "com.boris"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
// https://mvnrepository.com/artifact/commons-io/commons-io
implementation("commons-io:commons-io:2.11.0")
implementation("com.github.ajalt.clikt:clikt:3.4.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
sourceSets {
main {
java.setSrcDirs(listOf("src"))
resources.setSrcDirs(listOf("resources"))
}
test {
java.setSrcDirs(listOf("test"))
resources.setSrcDirs(listOf("resources"))
}
}
application {
mainClass.set("com.boris.bash.MainKt")
}
tasks.register<Jar>("uberJar") {
dependsOn(configurations.runtimeClasspath)
archiveClassifier.set("uber")
manifest.attributes["Main-Class"] = application.mainClass.get()
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(sourceSets.main.get().output)
from(
configurations
.runtimeClasspath
.get()
.filter { it.name.endsWith("jar") }
.map(::zipTree)
)
}
tasks.getByName<JavaExec>("run") {
standardInput = System.`in`
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}