gradle / gradle/gradle-native

Create tasks for a binary lazily or do not use `Provider` as the return type on task accessor methods

Open
#458 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
94
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Currently, the tasks attached to a binary are exposed using query methods with return type `Provider`. These tasks are created eagerly, so that calls to `get()` on these methods never fail and the return value never changes. This is basically the worst of all worlds, as it would be a breaking change to make the creation of the tasks lazy _plus_ there's extra ceremony that configuration code needs to use for no reason. We should either defer creation, so that configuration code needs to deal with the fact that these tasks are lazily created, or change these query methods to return the task instance rather than a provider, so that configuration code doesn't need the ceremony.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the binary task query methods and their Provider return types, then determine which API behavior is intended and how compatibility should be handled. Done means the chosen behavior is implemented with coverage for task creation and accessor results.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.