-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
85 lines (67 loc) · 2.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
plugins {
id 'org.springframework.boot' version '3.0.6'
id 'org.graalvm.buildtools.native' version '0.9.20'
id 'io.freefair.lombok' version '6.5.1'
id 'org.flywaydb.flyway' version '9.8.1'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'com.training'
version = '0.0.3'
sourceCompatibility = '17'
sourceSets {
integration {
java.srcDir "$projectDir/src/integration/java"
resources.srcDir "$projectDir/src/integration/resources"
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
configurations {
integrationImplementation.extendsFrom testImplementation
integrationRuntime.extendsFrom testRuntime
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/release") }
gradlePluginPortal()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
implementation 'org.flywaydb:flyway-core'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
integrationImplementation 'io.rest-assured:rest-assured:5.3.0'
integrationImplementation 'io.rest-assured:xml-path:5.3.0' //use to prevent dependency conflicts on groovy-xml dep
integrationImplementation "org.testcontainers:junit-jupiter:1.18.0"
integrationImplementation "org.testcontainers:testcontainers:1.18.0"
integrationImplementation "org.testcontainers:postgresql:1.18.0"
integrationImplementation 'org.postgresql:postgresql'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mockito:mockito-core:4.8.0'
testImplementation 'org.assertj:assertj-core:3.23.1'
}
test {
useJUnitPlatform()
}
tasks.withType(Jar) {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
tasks.withType(Copy).all {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
task integrationTest(type: Test) {
useJUnitPlatform()
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
}
check.dependsOn integrationTest