Skip to content

Commit

Permalink
README note.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdanfox committed Sep 16, 2019
1 parent addac0a commit ee46328
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,5 @@ Configures some sensible defaults:
2. If Gradle detects you use JUnit 5 (i.e. you have a `testImplementation 'org:junit.jupiter:junit-jupiter'` dependency), it will automatically configure your `Test` tasks to run with `useJUnitPlatform()`, and configure all `@Test` methods to run in parallel by default. Many other languages take this stance by default - if some tests rely on static state then you can mark them as non-parallel.
See more here: https://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution
The plugin also adds a `checkJUnitDependencies` to make the migration to JUnit5 safer. Specifically, it should prevent cases where the tests could silently not run due to misconfigured dependencies.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
import java.util.Optional;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.Task;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.artifacts.ModuleVersionIdentifier;
import org.gradle.api.artifacts.result.ResolvedComponentResult;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.specs.Spec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public CheckJUnitDependencies() {
}

@TaskAction
public void validateDependencies() {
public final void validateDependencies() {
getProject().getConvention()
.getPlugin(JavaPluginConvention.class)
.getSourceSets()
Expand Down

0 comments on commit ee46328

Please sign in to comment.