55 lines
1.3 KiB
Groovy
55 lines
1.3 KiB
Groovy
plugins {
|
|
id 'org.springframework.boot' version '2.2.5.RELEASE'
|
|
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
|
|
id 'java'
|
|
}
|
|
|
|
apply plugin: 'java'
|
|
|
|
group = 'de.kuksin'
|
|
version = '0.0.1-SNAPSHOT'
|
|
sourceCompatibility = '9'
|
|
|
|
configurations {
|
|
compileOnly {
|
|
extendsFrom annotationProcessor
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.flywaydb:flyway-core'
|
|
compileOnly 'org.projectlombok:lombok'
|
|
compile 'org.postgresql:postgresql'
|
|
runtimeOnly 'com.h2database:h2'
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
|
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
|
}
|
|
implementation 'junit:junit:4.12'
|
|
testCompile "org.testcontainers:testcontainers:1.12.5"
|
|
testCompile "org.testcontainers:junit-jupiter:1.12.5"
|
|
testCompile "org.testcontainers:postgresql:1.12.5"
|
|
|
|
}
|
|
|
|
dcompose {
|
|
testDb {
|
|
image = 'postgres:12.2'
|
|
portBindings = ['5432:5432']
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
//dependsOn startDatabaseContainer
|
|
dependsOn dcompose.testDb
|
|
//finalizedBy stopDatabaseContainer
|
|
|
|
}
|