-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
74 lines (63 loc) · 1.93 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
plugins {
application
java
`maven-publish`
}
application {
mainClassName = "ch.ergon.xcsbotcontrol.BotController"
}
tasks.jar {
archiveName = "xcsbotcontrol.jar"
manifest {
attributes["Main-Class"] = "ch.ergon.xcsbotcontrol.BotController"
}
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)
}
tasks.test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
jcenter()
}
dependencies {
compile("com.google.code.gson:gson:2.8.6")
compile("com.google.guava:guava:30.0-jre")
compile("info.picocli:picocli:4.5.2")
annotationProcessor("info.picocli:picocli-codegen:4.5.2")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
testCompile("org.mockito:mockito-core:3.6.28")
testCompile("org.mockito:mockito-junit-jupiter:3.6.28")
}
tasks.withType<JavaCompile> {
val compilerArgs = options.compilerArgs
compilerArgs.add("-Aproject=xcsbotcontrol")
}
group = "ch.ergon.xcsbotcontrol"
version = "1.0.3"
publishing {
publications {
register("gpr", MavenPublication::class) {
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ergon/xcsbotcontrol")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("PASSWORD")
}
}
}
}