Skip to content

Commit

Permalink
Enable configuration cache in functional tests. (#1063)
Browse files Browse the repository at this point in the history
Co-authored-by: Jendrik Johannes <[email protected]>
  • Loading branch information
autonomousapps and jjohannes authored Dec 12, 2023
1 parent bbcc8e2 commit 3aa33a9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ abstract class AbstractFunctionalSpec extends Specification {
}
}

// TODO only needed due to some CC issues in 7.4, remove an replace with above, once 7.5 becomes the minimum.
protected static List<GradleVersion> gradleVersionsCC() {
return gradleVersions().collect { it == GradleVersions.minGradleVersion ? GRADLE_7_5 : it }
}

/**
* For example, given:
* 1. [GradleVersion(5.6.4), GradleVersion(6.0.1), GradleVersion(6.1.1)] (size=3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class AbstractProject extends AbstractGradleProject {
protected GradleProject.Builder newGradleProjectBuilder() {
return super.newGradleProjectBuilder()
.withRootProject { r ->
r.gradleProperties += PRINT_ADVICE
r.gradleProperties += GradleProperties.enableConfigurationCache() + PRINT_ADVICE
r.withBuildScript { bs ->
bs.plugins(Plugins.dependencyAnalysis, Plugins.kotlinNoApply)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ final class ClassifiersSpec extends AbstractJvmSpec {
where:
[gradleVersion, variant] << multivariableDataPipe(
gradleVersions(), TransitiveClassifierTestProject.TestProjectVariant.values().toList())
gradleVersionsCC(), TransitiveClassifierTestProject.TestProjectVariant.values().toList())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class CustomSourceSetSpec extends AbstractJvmSpec {
where:
[gradleVersion, producerCodeInFeature, additionalCapabilities] << multivariableDataPipe(
gradleVersions(), [true, false], [true, false])
gradleVersionsCC(), [true, false], [true, false])
}
def "dependencies to test fixtures (#gradleVersion)"() {
Expand Down Expand Up @@ -129,7 +129,7 @@ final class CustomSourceSetSpec extends AbstractJvmSpec {
assertThat(project.actualBuildHealth()).containsExactlyElementsIn(project.expectedBuildHealth())
where:
gradleVersion << gradleVersions()
gradleVersion << gradleVersionsCC()
}
def "custom source set analysis can be fine-filtered for severity=#severity (#gradleVersion)"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ internal object GradleVersions {
val current: GradleVersion = GradleVersion.current()

val isAtLeastMinimum: Boolean = current >= minGradleVersion
val isAtLeastGradle74: Boolean = current >= gradle74
val isAtLeastGradle75: Boolean = current >= gradle75
val isAtLeastGradle82: Boolean = current >= gradle82
val isAtLeastGradle84: Boolean = current >= gradle84
Expand Down

0 comments on commit 3aa33a9

Please sign in to comment.