Workaround mapped value before task completed error for excluded task #576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using provider.map, Gradle has checks that can fail if the provider
is used too early. For example:
However, it seems those checks can also fire even if the incomplete task
is a properly registered dependency and only when accessed from an
action. This is possible when using -x to exclude a task. This deserves
a Gradle bug, but let's workaround it in the meantime.
Fixes #550
CC @rougsig, @Thrillpool
This will workaround whatever problem @Toldry experienced, but I expect that was a different issue compared to that seen by Thrillpool. There's a strong risk that there was a legitimate issue in Toldry's build that now will be silent. But without a reproduction not much we can do for something this nuanced.