File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
datadog/gradle/plugin/testJvmConstraints Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ tasks.withType<Test>().configureEach {
1717 return @configureEach
1818 }
1919
20- inputs.property(" testJvm" , providers.gradleProperty( " testJvm " ) )
20+ inputs.property(" testJvm" , testJvmSpec.testJvmProperty).optional( true )
2121
2222 val taskExtension = project.objects.newInstance<TestJvmConstraintsExtension >().also {
2323 configureConventions(it, projectExtension)
Original file line number Diff line number Diff line change @@ -9,9 +9,17 @@ import java.nio.file.Files
99import java.nio.file.Path
1010import java.nio.file.Paths
1111
12+
1213class TestJvmSpec (val project : Project ) {
14+ companion object {
15+ const val TEST_JVM = " testJvm"
16+ }
17+
1318 private val currentJavaHomePath = project.providers.systemProperty(" java.home" ).map { it.normalizeToJDKJavaHome() }
14- val normalizedTestJvm = project.providers.gradleProperty(" testJvm" ).map { testJvm ->
19+
20+ val testJvmProperty = project.providers.gradleProperty(TEST_JVM )
21+
22+ val normalizedTestJvm = testJvmProperty.map { testJvm ->
1523 if (testJvm.isBlank()) {
1624 throw GradleException (" testJvm property is blank" )
1725 }
You can’t perform that action at this time.
0 commit comments