Skip to content

Commit 3442315

Browse files
committed
Disable CC for com.github.johnrengelman.shadow only
1 parent 18eff67 commit 3442315

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

src/funcTest/groovy/me/champeau/jmh/AbstractFuncSpec.groovy

+7
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ abstract class AbstractFuncSpec extends Specification {
5959
noConfigurationCacheReason = reason
6060
}
6161

62+
/**
63+
* TODO: remove this once we bumped min Shadow support to 8.1.1 or dropped it.
64+
*/
65+
protected void disableConfigCacheForShadow(String pluginId) {
66+
noConfigurationCacheReason = 'com.github.johnrengelman.shadow supports CC from 8.1.1+'
67+
}
68+
6269
File getProjectDir() {
6370
temporaryFolder
6471
}

src/funcTest/groovy/me/champeau/jmh/JmhWithShadowPluginSpec.groovy

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ class JmhWithShadowPluginSpec extends AbstractFuncSpec {
3434
rootBuildFile.text = buildFileContent
3535
3636
usingGradleVersion(gradleVersion)
37-
// TODO: com.github.johnrengelman.shadow supports CC from 8.1.1+.
38-
if (shadowPlugin == 'com.github.johnrengelman.shadow') {
39-
withoutConfigurationCache('shadow plugin unsupported')
40-
}
37+
disableConfigCacheForShadow(shadowPlugin)
4138
4239
when:
4340
def result = build("jmh")

src/funcTest/groovy/me/champeau/jmh/ProjectWithDuplicateClassesSpec.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ProjectWithDuplicateClassesSpec extends AbstractFuncSpec {
6363
6464
given:
6565
usingGradleVersion(gradleVersion)
66-
withoutConfigurationCache('shadow plugin unsupported')
66+
disableConfigCacheForShadow(shadowPlugin)
6767
6868
and:
6969
buildFile << """
@@ -128,7 +128,7 @@ class ProjectWithDuplicateClassesSpec extends AbstractFuncSpec {
128128
129129
given:
130130
usingGradleVersion(gradleVersion)
131-
withoutConfigurationCache('shadow plugin unsupported')
131+
disableConfigCacheForShadow(shadowPlugin)
132132
133133
and:
134134
buildFile << """

src/funcTest/groovy/me/champeau/jmh/ProjectWithDuplicateDependenciesSpec.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ProjectWithDuplicateDependenciesSpec extends AbstractFuncSpec {
5454
5555
given:
5656
usingGradleVersion(gradleVersion)
57-
withoutConfigurationCache('shadow plugin unsupported')
57+
disableConfigCacheForShadow(shadowPlugin)
5858
5959
and:
6060
createBuildFile("""

0 commit comments

Comments
 (0)