@@ -3,14 +3,17 @@ package org.gradlex.javamodule.dependencies.test.configcache
33import org.gradlex.javamodule.dependencies.test.fixture.GradleBuild
44import spock.lang.Specification
55
6- class ConfigurationCacheTest extends Specification {
6+ import static org.gradle.util.GradleVersion.version
77
8- static final NO_CACHE_MESSAGE =
9- " Calculating task graph as no cached configuration is available for tasks: :app:compileJava"
8+ class ConfigurationCacheTest extends Specification {
109
1110 @Delegate
1211 GradleBuild build = new GradleBuild ()
1312
13+ final noCacheMessage = version(gradleVersionUnderTest) >= version(" 8.8" )
14+ ? " Calculating task graph as no cached configuration is available for tasks: :app:compileJava"
15+ : " Calculating task graph as no configuration cache is available for tasks: :app:compileJava"
16+
1417 def " configurationCacheHit" () {
1518 given :
1619 libModuleInfoFile << ' module abc.lib { }'
@@ -26,7 +29,7 @@ class ConfigurationCacheTest extends Specification {
2629 def result = runner. build()
2730
2831 then :
29- result. output. contains(NO_CACHE_MESSAGE )
32+ result. output. contains(noCacheMessage )
3033
3134 when :
3235 result = runner. build()
@@ -48,7 +51,7 @@ class ConfigurationCacheTest extends Specification {
4851 def result = runner. build()
4952
5053 then :
51- result. output. contains(NO_CACHE_MESSAGE )
54+ result. output. contains(noCacheMessage )
5255
5356 when :
5457 appModuleInfoFile. write('''
@@ -76,7 +79,7 @@ class ConfigurationCacheTest extends Specification {
7679 def result = runner. build()
7780
7881 then :
79- result. output. contains(NO_CACHE_MESSAGE )
82+ result. output. contains(noCacheMessage )
8083
8184 when :
8285 appModuleInfoFile. write('''
0 commit comments