-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
117 lines (95 loc) · 3.06 KB
/
Copy pathbuild.gradle
File metadata and controls
117 lines (95 loc) · 3.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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
plugins {
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.4.2'
id 'io.spring.dependency-management' version '1.1.6'
id 'com.diffplug.spotless' version '6.25.0'
id 'info.solidsoft.pitest' version '1.15.0'
}
repositories {
mavenCentral()
mavenLocal()
}
group = 'com.paymybuddy'
version = '1.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
ext {
set('snippetsDir', file("build/generated-snippets"))
}
dependencies {
// -- Database --
runtimeOnly 'org.postgresql:postgresql'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
// -- Backend --
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'me.paulschwarz:spring-dotenv:4.0.0'
// -- Security --
implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
implementation 'org.springframework.boot:spring-boot-starter-security'
// -- Frontend --
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:3.3.0'
// -- Testing --
testAnnotationProcessor 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'com.h2database:h2'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.diffplug.selfie:selfie-runner-junit5:2.4.1'
// -- Custom dependency --
implementation 'net.xyzsd:dichotomy:1.0'
implementation 'net.xyzsd.fluent:fluent-functions-icu:0.70'
}
// -- Building --
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
// -- Linting --
spotless {
java {
importOrder()
removeUnusedImports()
cleanthat()
.version('2.21')
.sourceCompatibility('21')
// This fail for `spotlessApply` because it doesn't completely support Java 21.
// Formatting the file individually works fine tho
palantirJavaFormat('2.50.0').style('AOSP').formatJavadoc(true)
formatAnnotations()
}
}
// -- Testing --
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
test {
environment project.properties.subMap(["selfie"])
inputs.files(fileTree("src/test") { // optional, improves up-to-date checking
include "**/*.ss"
})
}
pitest {
junit5PluginVersion = "1.2.1"
}