Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ $ ./gradlew assemble
Итак, для сборки приложения с запуском всех тестов локально необходимо выполнить две команды:

```
$ docker-compose up -d
$ ./gradlew build
```

Expand Down
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id 'org.jetbrains.kotlin.plugin.spring' version '1.3.61'
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.zensoft.versioning' version '1.1.0' // This plugin made by me and my previous team :)
id 'com.palantir.docker-compose' version '0.25.0'
}

apply plugin: 'io.spring.dependency-management'
Expand Down Expand Up @@ -92,6 +93,7 @@ compileTestKotlin {

// Tests
test {
dependsOn dockerComposeUp
useJUnitPlatform()

if (project.hasProperty('maxParallelForks')) {
Expand All @@ -100,7 +102,13 @@ test {
if (project.hasProperty('forkEvery')) {
forkEvery = project.forkEvery as int
}
finalizedBy dockerComposeDown
}

dockerComposeUp {
dependsOn generateDockerCompose
}

jacoco {
toolVersion = "0.8.5"
}
Expand Down Expand Up @@ -132,3 +140,8 @@ idea {
generatedSourceDirs += kaptMain
}
}

dockerCompose {
template 'docker-compose.yml'
dockerComposeFile "${project.buildDir}${File.separator}/docker-compose.yml"
}