-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
47 lines (38 loc) · 1.19 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
plugins {
id("org.jetbrains.kotlin.jvm").version("1.3.41")
application
}
repositories {
jcenter()
}
fun moshi(module: String, version: String = "1.8.0"): Any =
"com.squareup.moshi:moshi-$module:$version"
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation(moshi("adapters"))
implementation(moshi("kotlin"))
implementation("com.github.ajalt:clikt:2.1.0")
implementation("com.github.ajalt:mordant:1.2.1")
implementation("com.opencsv:opencsv:4.6")
}
application {
// Define the main class for the application.
mainClassName = "devfest.bim.MainKt"
}
// Create fat jar
tasks {
register("fatJar", Jar::class.java) {
archiveClassifier.set("all")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes("Main-Class" to application.mainClassName)
}
from(configurations.runtimeClasspath.get()
.onEach { println("add from dependencies: ${it.name}") }
.map { if (it.isDirectory) it else zipTree(it) })
val sourcesMain = sourceSets.main.get()
sourcesMain.allSource.forEach { println("add from sources: ${it.name}") }
from(sourcesMain.output)
}
}