Skip to content

Commit

Permalink
Disable CC for com.github.johnrengelman.shadow only
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Aug 25, 2024
1 parent 18eff67 commit 3442315
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
7 changes: 7 additions & 0 deletions src/funcTest/groovy/me/champeau/jmh/AbstractFuncSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ abstract class AbstractFuncSpec extends Specification {
noConfigurationCacheReason = reason
}

/**
* TODO: remove this once we bumped min Shadow support to 8.1.1 or dropped it.
*/
protected void disableConfigCacheForShadow(String pluginId) {
noConfigurationCacheReason = 'com.github.johnrengelman.shadow supports CC from 8.1.1+'
}

File getProjectDir() {
temporaryFolder
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ class JmhWithShadowPluginSpec extends AbstractFuncSpec {
rootBuildFile.text = buildFileContent
usingGradleVersion(gradleVersion)
// TODO: com.github.johnrengelman.shadow supports CC from 8.1.1+.
if (shadowPlugin == 'com.github.johnrengelman.shadow') {
withoutConfigurationCache('shadow plugin unsupported')
}
disableConfigCacheForShadow(shadowPlugin)
when:
def result = build("jmh")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ProjectWithDuplicateClassesSpec extends AbstractFuncSpec {
given:
usingGradleVersion(gradleVersion)
withoutConfigurationCache('shadow plugin unsupported')
disableConfigCacheForShadow(shadowPlugin)
and:
buildFile << """
Expand Down Expand Up @@ -128,7 +128,7 @@ class ProjectWithDuplicateClassesSpec extends AbstractFuncSpec {
given:
usingGradleVersion(gradleVersion)
withoutConfigurationCache('shadow plugin unsupported')
disableConfigCacheForShadow(shadowPlugin)
and:
buildFile << """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ProjectWithDuplicateDependenciesSpec extends AbstractFuncSpec {
given:
usingGradleVersion(gradleVersion)
withoutConfigurationCache('shadow plugin unsupported')
disableConfigCacheForShadow(shadowPlugin)
and:
createBuildFile("""
Expand Down

0 comments on commit 3442315

Please sign in to comment.