improve-tests #28
@@ -1,5 +1,6 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
val containerAlwaysOn: Boolean by project
|
||||
val containerAlwaysOn: String by project
|
||||
val disableLint: String by project
|
||||
|
||||
plugins {
|
||||
jacoco
|
||||
@@ -10,7 +11,7 @@ plugins {
|
||||
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
|
||||
id("org.owasp.dependencycheck") version "6.1.1"
|
||||
id("fr.coppernic.versioning") version "3.2.1"
|
||||
id("com.avast.gradle.docker-compose") version "0.14.0"
|
||||
id("com.avast.gradle.docker-compose") version "0.14.4"
|
||||
id("org.sonarqube") version "+"
|
||||
}
|
||||
|
||||
@@ -43,8 +44,10 @@ tasks.test {
|
||||
useJUnit()
|
||||
useJUnitPlatform()
|
||||
systemProperty("junit.jupiter.execution.parallel.enabled", true)
|
||||
if (disableLint.toBoolean() == false) {
|
||||
finalizedBy(tasks.ktlintCheck)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.jacocoTestReport {
|
||||
dependsOn(tasks.test)
|
||||
@@ -87,7 +90,7 @@ apply(plugin = "docker-compose")
|
||||
dockerCompose {
|
||||
projectName = "postgres-json"
|
||||
useComposeFiles = listOf("docker-compose.yml")
|
||||
stopContainers = if (project.hasProperty("containerAlwaysOn")) containerAlwaysOn else false
|
||||
stopContainers = !containerAlwaysOn.toBoolean()
|
||||
isRequiredBy(project.tasks.test)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,3 +7,5 @@ systemProp.sonar.organization=flecomte
|
||||
systemProp.sonar.java.coveragePlugin=jacoco
|
||||
systemProp.sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml
|
||||
org.gradle.jvmargs=-Xmx4096M
|
||||
containerAlwaysOn=false
|
||||
disableLint=false
|
||||
Reference in New Issue
Block a user