-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
92 lines (73 loc) · 2.57 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
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
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.+'
id 'io.spring.dependency-management' version '1.1.+'
id "com.diffplug.spotless" version "6.+"
id 'com.github.spotbugs' version '6.+'
id 'pmd'
id 'jacoco'
}
apply from: 'gradle/spotless.gradle'
apply from: 'gradle/spotbugs.gradle'
apply from: 'gradle/pmd.gradle'
apply from: 'gradle/jacoco.gradle'
apply from: 'gradle/integration.gradle'
group = 'com.rangerforge'
version = '1.0.0'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
// Spring Dependencies
implementation 'org.springframework.boot:spring-boot-starter-actuator:3.3.+'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.3.+'
implementation 'org.springframework.boot:spring-boot-starter-web:3.3.+'
implementation 'org.springframework.boot:spring-boot-starter-webflux:3.3.+'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.3.+'
// Uncomment if you wish to use Docker Compose on local application startup
//developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
// OpenAPI Auto-Generated Documentation
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.+'
// Mock DB
implementation 'com.h2database:h2'
// Lombok
compileOnly 'org.projectlombok:lombok:1.18.+'
annotationProcessor 'org.projectlombok:lombok:1.18.+'
// Inter-Object Mapping
implementation "org.mapstruct:mapstruct:$mapstructVersion"
annotationProcessor "org.mapstruct:mapstruct-processor:$mapstructVersion"
testAnnotationProcessor "org.mapstruct:mapstruct-processor:$mapstructVersion"
// Unit testing
testImplementation 'org.mockito:mockito-core:5.+'
testImplementation 'org.instancio:instancio-junit:5.+' // Creating test fixtures
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.+' // Mocking WebClient calls
// Arch Unit
testImplementation 'com.tngtech.archunit:archunit-junit5:1.3.+'
// Wiremock
testImplementation 'org.wiremock:wiremock-standalone:3.9.+'
// TODO Fix runtime issue with Find Security Bugs
// spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.13.+'
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
bootRun {
args = ["--spring.profiles.active=local"]
}
tasks.named("processIntegrationResources", Copy) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}