-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
53 lines (47 loc) · 1.45 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
plugins {
id 'org.springframework.boot' version '2.5.3'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'groovy'
}
group = 'ningenme.net'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
//spring-boot
implementation 'org.springframework.boot:spring-boot-starter-web'
//lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
//mysql
implementation 'mysql:mysql-connector-java:8.0.21'
//mybatis
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.0'
//spring-boot-test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
//dbunit
testImplementation 'org.dbunit:dbunit:2.7.2'
//groovy
testImplementation "org.spockframework:spock-spring:2.0-groovy-3.0"
testImplementation "org.spockframework:spock-core:2.0-groovy-3.0"
testImplementation "org.codehaus.groovy:groovy-all:3.0.8"
//junit
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.0.0'
}
task dockerComposeUp (type: Exec) {
commandLine 'docker-compose','-f','src/test/resources/docker-compose.yaml','up','-d'
doLast {
Thread.sleep(5 * 1000) //5sec
}
}
task dockerComposeDown (type: Exec) {
commandLine 'docker-compose', '-f', 'src/test/resources/docker-compose.yaml', 'down', '--remove-orphans', '--volumes'
}
test {
useJUnitPlatform()
dependsOn(dockerComposeUp)
}