From 8a2d100e963019f1bd03088a91fb66c822edbf52 Mon Sep 17 00:00:00 2001 From: tzugen Date: Thu, 6 May 2021 20:17:32 +0200 Subject: [PATCH] Migrate ciTest to "Task Configuration Avoidance" --- gradle_scripts/kotlin-module-bootstrap.gradle | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gradle_scripts/kotlin-module-bootstrap.gradle b/gradle_scripts/kotlin-module-bootstrap.gradle index 7dc53a05..ac732a7f 100644 --- a/gradle_scripts/kotlin-module-bootstrap.gradle +++ b/gradle_scripts/kotlin-module-bootstrap.gradle @@ -10,9 +10,6 @@ sourceSets { test.resources.srcDirs += "${projectDir}/src/integrationTest/resources" } -test { - useJUnitPlatform() -} dependencies { api other.kotlinStdlib @@ -44,15 +41,17 @@ jacocoTestReport { } } -test.finalizedBy jacocoTestReport -test { +tasks.named("test").configure { + useJUnitPlatform() jacoco { excludes += jacocoExclude includeNoLocationClasses = true } + finalizedBy jacocoTestReport } -tasks.create(name: "ciTest", dependsOn: "test") { +tasks.register("ciTest") { + dependsOn test group = "Verification" description = "Special task for CI that calls all tests in pure kotlin modules" }