diff --git a/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts b/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts index 5dcf6a9..b813e3c 100644 --- a/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts @@ -16,6 +16,7 @@ @file:Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") +import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform import java.lang.Boolean as JavaBoolean @@ -25,6 +26,8 @@ plugins { id("de.jjohannes.extra-java-module-info") } +val isCI = System.getenv("CI").toBoolean(); + group = "io.github.nstdio" java { @@ -43,6 +46,13 @@ configurations.getByName("spiTestImplementation") { extendsFrom(configurations.testImplementation.get()) } +mapOf( + "spiTestImplementation" to "testImplementation", + "spiTestRuntimeOnly" to "testRuntimeOnly", +).forEach { (t, u) -> + configurations.getByName(t) { extendsFrom(configurations.getByName(u)) } +} + val notModularConfigurations = setOf("testRuntimeClasspath", "testCompileClasspath", "spiTestRuntimeClasspath", "spiTestCompileClasspath") configurations.names @@ -123,10 +133,12 @@ tasks.withType().configureEach { tasks.withType { useJUnitPlatform() - + reports { + html.required.set(!isCI) + } testLogging { events("skipped", "failed") - exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL + exceptionFormat = FULL } } diff --git a/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.quality-conventions.gradle.kts b/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.quality-conventions.gradle.kts index 9b239d7..5e73025 100644 --- a/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.quality-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.quality-conventions.gradle.kts @@ -21,7 +21,7 @@ plugins { id("org.sonarqube") } -val isCI = System.getenv("CI").toBoolean() + sonarqube { properties { @@ -37,6 +37,7 @@ jacoco { tasks.withType { reports { + val isCI = System.getenv("CI").toBoolean() xml.required.set(isCI) html.required.set(!isCI) }