forked from junit-team/junit5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create
junitPlatformTest
task during configuration phase
This enables users to retrieve and add dependencies, configure inputs, and other user-supplied details at configuration time. We need the user supplied configuration to be applied lazily after they configure it, which means we cannot do it at plugin `apply` time. We can also use `Callable`/`Closure` in the `inputs.property` method, but that will only work for properties but not for methods. Another way of accomplishing lazy properties is by using `conventionMapping`, but that also has pitfalls (see https://github.com/gradle/gradle/blob/master/design-docs/internal-apis-made-public.md). This means we don't have an effective way of lazily configuring the `args` or the `systemProperty` of the task. The easiest way forward is to simply create the task at configuration time and then apply the rest of the configuration in the `afterEvaluate` method to avoid using internal `conventionMapping`. closes junit-team#708 See related Gradle issue for making lazy properties at gradle/gradle#726
- Loading branch information
Showing
2 changed files
with
63 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters