Skip to content

Commit

Permalink
Upgrade test distribution plugin (#333)
Browse files Browse the repository at this point in the history
This fixes a bug which prevented test selection to work properly with JUnit 5.7.
We can now remove the constraint, which should avoid cache misses when a build
is executed on CI and that test selection is enabled locally.
  • Loading branch information
melix committed May 6, 2022
1 parent e9f45e2 commit 7828135
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ dependencies {
}

implementation 'com.gradle:gradle-enterprise-gradle-plugin:3.10'
implementation 'com.gradle.enterprise:test-distribution-gradle-plugin:2.3'
implementation 'com.gradle.enterprise:test-distribution-gradle-plugin:2.3.1'
implementation 'org.nosphere.gradle.github:gradle-github-actions-plugin:1.3.2'
implementation 'com.gradle:common-custom-user-data-gradle-plugin:1.6.5'
implementation 'org.gradle:test-retry-gradle-plugin:1.3.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,6 @@ class MicronautBuildCommonPlugin implements Plugin<Project> {
}
}

def testSelectionEnabled = micronautBuildExtension.environment.isTestSelectionEnabled()
project.dependencies {
testImplementation(testSelectionEnabled.map { enabled ->
if (enabled) {
platform('org.junit:junit-bom') {
version {
require '[5.8,)'
prefer '5.8.2'
}
because "Predictive test selection requires JUnit 5.8+"
}
} else {
null
}
})
}

project.tasks.withType(Test).configureEach {
jvmArgs '-Duser.country=US'
jvmArgs '-Duser.language=en'
Expand All @@ -141,7 +124,7 @@ class MicronautBuildCommonPlugin implements Plugin<Project> {
failOnPassedAfterRetry.set(false)
}
predictiveSelection {
enabled = testSelectionEnabled
enabled = micronautBuildExtension.environment.isTestSelectionEnabled()
}
}

Expand Down

0 comments on commit 7828135

Please sign in to comment.