-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
63 lines (53 loc) · 1.58 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
plugins {
id 'java'
id 'com.diffplug.spotless' version '6.12.0'
id 'jacoco'
id "com.github.spotbugs" version "6.0.4"
}
group 'io.github.andrewfitzy'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.slf4j:slf4j-api:2.0.9'
implementation 'com.fasterxml.jackson.core:jackson-core:2.16.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.16.1'
testImplementation 'org.slf4j:slf4j-simple:2.0.9'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport // report is always generated after tests run
testLogging.showStandardStreams = true
testLogging.exceptionFormat = 'full'
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
spotless {
java {
palantirJavaFormat('2.28.0')
// make sure every file has the following copyright header.
licenseHeader '/* (C)$YEAR */'
}
}
tasks.spotbugsMain {
reports.create("html") {
required = true
outputLocation = file("$buildDir/reports/spotbugs.html")
setStylesheet("fancy-hist.xsl")
}
}
tasks.register("initProject") {
group = "Custom"
description = "Init task for the project, run this after cloning"
doLast {
println("... Adding pre-commit hook")
exec {
commandLine("cp", "./.scripts/pre-commit", "./.git/hooks")
}
println("✅ Added Pre-commit Git Hook Script.")
}
}