-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (49 loc) · 1.66 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.7.10"
// Plugin for Dokka - KDoc generating tool
id("org.jetbrains.dokka") version "1.6.10"
application
jacoco
// Plugin for Ktlint
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
}
group = "ie.setu"
version = "1.0"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
// https://mvnrepository.com/artifact/io.github.microutils/kotlin-logging
implementation("io.github.microutils:kotlin-logging:3.0.4")
// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
implementation("org.slf4j:slf4j-simple:2.0.5")
// https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream
implementation("com.thoughtworks.xstream:xstream:1.4.19")
// https://mvnrepository.com/artifact/org.codehaus.jettison/jettison
implementation("org.codehaus.jettison:jettison:1.5.2")
// For generating a Dokka Site from KDoc
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.7.20")
}
tasks.test {
useJUnitPlatform()
// report is always generated after tests run
finalizedBy(tasks.jacocoTestReport)
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
application {
mainClass.set("MainKt")
}
tasks.jar {
manifest.attributes["Main-Class"] = "MainKt"
// for building a fat jar - include all dependencies
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}