-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
66 lines (53 loc) · 1.47 KB
/
build.gradle
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
plugins {
id("java")
id("application") // For running the application with `gradle run`
id("com.github.johnrengelman.shadow") version "8.1.1" // For creating a fat JAR
}
group = "org.holbreich"
version = "1.0.0"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
mainClassName = 'org.holbreich.chain.node.Node' // TODO. Improve in the future.
jar {
manifest {
attributes(
'Main-Class': mainClassName
)
}
}
tasks.named('shadowJar') {
archiveClassifier.set('')
}
sourceSets {
main {
java.srcDirs("src/main/java")
}
test {
java.srcDirs("src/test/java")
}
}
repositories {
mavenCentral()
}
dependencies {
// SLF4J API
implementation 'org.slf4j:slf4j-api:2.0.9'
// Logback for logging implementation
implementation 'ch.qos.logback:logback-classic:1.4.11'
// Optional: Logback dependencies (if needed)
implementation 'ch.qos.logback:logback-core:1.4.11'
// Testing dependencies
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
}
tasks.test {
useJUnitPlatform() // Enables JUnit 5 tests
testLogging {
events("passed", "skipped", "failed")
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL // Full stack trace
showExceptions = true
showCauses = true
showStackTraces = true
showStandardStreams = true // Include System.out and System.err in output
}
}