-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
57 lines (50 loc) · 2.06 KB
/
build.gradle.kts
File metadata and controls
57 lines (50 loc) · 2.06 KB
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
plugins {
application
id("com.gradleup.shadow") version "9.3.2"
}
application {
mainClass.set("dev.dbos.transact.cli.Main")
}
dependencies {
implementation(project(":transact"))
implementation("com.fasterxml.jackson.core:jackson-databind:2.21.1")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.21.1")
implementation("info.picocli:picocli:4.7.7")
runtimeOnly("org.slf4j:slf4j-simple:2.0.17")
testImplementation(platform("org.junit:junit-bom:6.0.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.testcontainers:testcontainers-postgresql:2.0.3")
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
showStandardStreams = true
}
addTestListener(object : TestListener {
override fun beforeSuite(suite: TestDescriptor) {}
override fun beforeTest(testDescriptor: TestDescriptor) {}
override fun afterTest(testDescriptor: TestDescriptor, result: TestResult) {}
override fun afterSuite(suite: TestDescriptor, result: TestResult) {
if (suite.parent == null) {
println("\nTest Results:")
println(" Tests run: ${result.testCount}")
println(" Passed: ${result.successfulTestCount}")
println(" Failed: ${result.failedTestCount}")
println(" Skipped: ${result.skippedTestCount}")
}
}
})
}
tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
archiveBaseName.set("dbos")
archiveVersion.set("")
archiveClassifier.set("")
}
tasks.withType<JavaCompile> {
options.compilerArgs.add("-Xlint:unchecked") // warn about unchecked operations
options.compilerArgs.add("-Xlint:deprecation") // warn about deprecated APIs
options.compilerArgs.add("-Xlint:rawtypes") // warn about raw types
options.compilerArgs.add("-Werror") // treat all warnings as errors
}