forked from joseeliaschavez/java-rest-api-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (67 loc) · 2.43 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.0'
id 'io.spring.dependency-management' version '1.1.0'
id "com.diffplug.spotless" version "6.19.0"
id 'jacoco'
}
apply from: 'gradle/spotless.gradle'
apply from: 'gradle/jacoco.gradle'
apply from: 'gradle/integration.gradle'
group = 'com.slalombuild'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
mapstructVersion = "1.5.5.Final"
}
dependencies {
// Spring Dependencies
implementation 'org.springframework.boot:spring-boot-starter-actuator:3.1.+'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.1.+'
implementation 'org.springframework.boot:spring-boot-starter-web:3.1.+'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.1.+'
implementation 'org.springframework.boot:spring-boot-starter-webflux:3.1.+'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.1.+'
// 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.2.+'
// 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:2.+' // Creating test fixtures
testImplementation 'com.squareup.okhttp3:mockwebserver:4.11.+' // Mocking WebClient calls
// Arch Unit
testImplementation 'com.tngtech.archunit:archunit-junit5:1.0.1'
// Wiremock
testImplementation "com.github.tomakehurst:wiremock-standalone:3.0.0-beta-8"
}
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
}