-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
103 lines (85 loc) · 2.6 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.21"
application
jacoco
id("io.gitlab.arturbosch.detekt") version "1.18.0-RC3"
id("org.jetbrains.dokka") version "1.4.32"
}
group = "edu.udo.cs.sopra"
version = "1.0"
repositories {
mavenCentral()
maven {
url = uri("https://sopra-gitlab.cs.tu-dortmund.de/api/v4/projects/859/packages/maven")
credentials(HttpHeaderCredentials::class) {
name = "Private-Token"
value = "glpat-b3cvL5naHNWreYWvLsA4"
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
application {
mainClass.set("MainKt")
}
dependencies {
testImplementation(kotlin("test-junit5"))
implementation(group = "tools.aqua", name = "bgw-gui", version = "0.7.3")
implementation(group = "tools.aqua", name = "bgw-net-common", version = "0.7.3")
implementation(group = "tools.aqua", name = "bgw-net-client", version = "0.7.3")
implementation(group = "edu.udo.cs.sopra", name = "ntf", version = "1.6")
}
tasks.distZip {
archiveFileName.set("distribution.zip")
destinationDirectory.set(layout.projectDirectory.dir("public"))
into("") {
from(".")
include("Sopra-HowToPlay.pdf")
}
}
tasks.test {
useJUnitPlatform()
reports.html.outputLocation.set(layout.projectDirectory.dir("public/test"))
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.clean {
delete.add("public")
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports {
xml.required.set(false)
csv.required.set(false)
html.outputLocation.set(layout.projectDirectory.dir("public/coverage"))
}
classDirectories.setFrom(files(classDirectories.files.map {
fileTree(it) {
exclude(listOf("view/**", "entity/serializer.", "Main*.*"))
}
}))
}
detekt {
// Version of Detekt that will be used. When unspecified the latest detekt
// version found will be used. Override to stay on the same version.
toolVersion = "1.18.0-RC3"
//source.setFrom()
config = files("detektConfig.yml")
reports {
// Enable/Disable HTML report (default: true)
html {
enabled = true
reportsDir = file("public/detekt")
}
sarif {
enabled = false
}
}
}
tasks.dokkaHtml.configure {
outputDirectory.set(projectDir.resolve("public/dokka"))
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}