-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (56 loc) · 1.77 KB
/
build.gradle.kts
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
plugins {
java
id("org.springframework.boot") version "2.6.3"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
group = "eu.mneifercons.examples"
version = "0.0.1-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-test:2.7.0")
implementation("org.springframework.boot:spring-boot-starter-web:2.7.0")
implementation("org.springdoc:springdoc-openapi-ui:1.6.8")
implementation("org.glassfish.jaxb:jaxb-runtime:4.0.0")
}
testing {
suites {
val test by getting(JvmTestSuite::class) {
testType.set(TestSuiteType.UNIT_TEST)
useJUnitJupiter()
dependencies {
implementation("org.springframework.boot:spring-boot-starter-test")
implementation("io.rest-assured:spring-mock-mvc:4.5.0")
}
}
val integrationTest by registering(JvmTestSuite::class) {
testType.set(TestSuiteType.INTEGRATION_TEST)
dependencies {
implementation(project)
implementation("io.rest-assured:rest-assured:4.5.1")
implementation("io.rest-assured:json-path:4.5.1")
implementation("io.rest-assured:xml-path:4.5.1")
}
sources {
java {
setSrcDirs(listOf("src/it/java"))
}
}
targets {
all {
testTask.configure {
shouldRunAfter(test)
}
}
}
}
}
}
tasks.named("check") {
dependsOn(testing.suites.named("integrationTest"))
}