From fa27d0674489166aa2ebf09f1228070fd76a9dc5 Mon Sep 17 00:00:00 2001 From: daz Date: Mon, 17 Jul 2023 14:00:55 -0600 Subject: [PATCH] Test configuration-cache compatibility --- .../gradlebuildaction/TestDependencyGraph.groovy | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDependencyGraph.groovy b/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDependencyGraph.groovy index 235adbf..01dc635 100644 --- a/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDependencyGraph.groovy +++ b/test/init-scripts/src/test/groovy/com/gradle/gradlebuildaction/TestDependencyGraph.groovy @@ -8,7 +8,6 @@ class TestDependencyGraph extends BaseInitScriptTest { static final List NO_DEPENDENCY_GRAPH_VERSIONS = [GRADLE_3_X, GRADLE_4_X] static final List DEPENDENCY_GRAPH_VERSIONS = ALL_VERSIONS - NO_DEPENDENCY_GRAPH_VERSIONS - def "does not produce dependency graph when not enabled"() { assumeTrue testGradleVersion.compatibleWithCurrentJvm @@ -35,6 +34,20 @@ class TestDependencyGraph extends BaseInitScriptTest { testGradleVersion << DEPENDENCY_GRAPH_VERSIONS } + // Dependency-graph plugin doesn't support config-cache for 8.0 of Gradle + def "produces dependency graph with configuration-cache on latest Gradle"() { + assumeTrue testGradleVersion.compatibleWithCurrentJvm + + when: + run(['help'], initScript, testGradleVersion.gradleVersion, [], envVars) + + then: + assert reportFile.exists() + + where: + testGradleVersion << [GRADLE_8_X] + } + def "warns and produces no dependency graph when enabled for older Gradle versions"() { assumeTrue testGradleVersion.compatibleWithCurrentJvm