Skip to content

Commit 11df425

Browse files
authored
Run tests agains latest Gradle with project isolation turned on (#144)
1 parent 118b8d3 commit 11df425

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/test/groovy/org/gradlex/jvm/dependency/conflict/test/GuavaClasspathTest.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ class GuavaClasspathTest extends Specification {
163163
}
164164
165165
tasks.register("printJars") {
166+
inputs.files(configurations.${classpath})
166167
doLast {
167-
configurations.${classpath}.get().files.forEach { println(it.name) }
168+
inputs.files.forEach { println(it.name) }
168169
}
169170
}
170171
"""

src/test/groovy/org/gradlex/jvm/dependency/conflict/test/fixture/GradleBuild.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ class GradleBuild {
6363
}
6464

6565
GradleRunner runner(String... args) {
66+
List<String> latestFeaturesArgs = GRADLE_VERSION_UNDER_TEST ? [] : [
67+
'--configuration-cache',
68+
'-Dorg.gradle.unsafe.isolated-projects=true'
69+
]
6670
GradleRunner.create()
6771
.forwardOutput()
6872
.withPluginClasspath()
6973
.withProjectDir(projectDir)
70-
.withArguments(Arrays.asList(args) + '-s' + '-q')
74+
.withArguments(Arrays.asList(args) + latestFeaturesArgs + '-s' + '-q')
7175
.withDebug(ManagementFactory.getRuntimeMXBean().getInputArguments().toString().contains("-agentlib:jdwp")).with {
7276
GRADLE_VERSION_UNDER_TEST ? it.withGradleVersion(GRADLE_VERSION_UNDER_TEST) : it
7377
}

0 commit comments

Comments
 (0)