Skip to content

Commit

Permalink
Fix test and use Gradle 8.5 as baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
melix committed Dec 12, 2023
1 parent 2d6f14e commit 3be32a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ abstract class AbstractFuncSpec extends Specification {

protected static final List<GradleVersion> TESTED_GRADLE_VERSIONS = [
GradleVersion.version('7.0'),
GradleVersion.version('8.0'),
GradleVersion.current()
]

Expand Down
5 changes: 3 additions & 2 deletions src/funcTest/groovy/me/champeau/jmh/ParameterSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package me.champeau.jmh

import org.gradle.util.GradleVersion

import spock.lang.Unroll

import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
Expand Down Expand Up @@ -46,7 +46,8 @@ class ParameterSpec extends AbstractFuncSpec {

then:
result.task(":jmhJar").outcome == SUCCESS
result.output.contains("Calculating task graph as no configuration cache is available for tasks: jmhJar")
result.output.contains("Calculating task graph as no configuration cache is available for tasks: jmhJar") ||
result.output.contains("Calculating task graph as no cached configuration is available for tasks: jmhJar")

when:
result = build("jmhJar", "--configuration-cache")
Expand Down
4 changes: 2 additions & 2 deletions src/main/groovy/me/champeau/jmh/JMHPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class JMHPlugin implements Plugin<Project> {
static final String JHM_RUNTIME_CLASSPATH_CONFIGURATION = 'jmhRuntimeClasspath'

@Inject
protected abstract ArchiveOperations getArchives()
protected abstract ArchiveOperations getArchiveOperations()

void apply(Project project) {
assertMinimalGradleVersion()
Expand Down Expand Up @@ -271,7 +271,7 @@ abstract class JMHPlugin implements Plugin<Project> {
Provider<Directory> jmhGeneratedClassesDir,
Configuration runtimeConfiguration) {
project.tasks.register(JMH_JAR_TASK_NAME, Jar) {
def archives = archives
def archives = archiveOperations

it.group = JMH_GROUP
it.dependsOn JMH_TASK_COMPILE_GENERATED_CLASSES_NAME
Expand Down

0 comments on commit 3be32a9

Please sign in to comment.