diff --git a/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/GradleTestNameGenerator.kt b/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/GradleTestNameGenerator.kt index 5b011d127e..817aa82ed8 100644 --- a/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/GradleTestNameGenerator.kt +++ b/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/GradleTestNameGenerator.kt @@ -8,7 +8,7 @@ package org.jetbrains.compose.test import org.junit.jupiter.api.DisplayNameGenerator class GradleTestNameGenerator : DisplayNameGenerator.Standard() { - private val gradleVersion = "[Gradle '${TestProperties.gradleVersionForTests}']" + private val gradleVersion = TestProperties.gradleVersionForTests?.let { "[Gradle '$it']" } ?: "" override fun generateDisplayNameForClass(testClass: Class<*>?): String = super.generateDisplayNameForClass(testClass) + gradleVersion diff --git a/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProperties.kt b/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProperties.kt index e3cff07842..4610bc3686 100644 --- a/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProperties.kt +++ b/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProperties.kt @@ -9,6 +9,6 @@ object TestProperties { val composeVersion: String get() = System.getProperty("compose.plugin.version")!! - val gradleVersionForTests: String - get() = System.getProperty("gradle.version.for.tests")!! + val gradleVersionForTests: String? + get() = System.getProperty("gradle.version.for.tests") }