gradleTask
fun gradleTask(sourceId: String, tasksProvider: suspend (TerminalCompletionRequest, TerminalCompletionContext) -> List<TerminalGradleTask>): TerminalCompletionSource
Creates a source for host-indexed Gradle tasks.
The source understands Gradle's canonical :project:task notation and scopes short task names after -p or --project-dir. tasksProvider receives the resolved semantic context and returns a snapshot bounded by its own host-model input or visit budget. The shared source matches that snapshot before applying the final candidate limit. The loader may read a host model but must never start Gradle from a completion request.
Return
context-aware Gradle task completion source.
Parameters
sourceId
stable candidate-source id used by ranking feedback.
tasksProvider
suspending bounded Gradle-task snapshot loader.
Throws
if sourceId is blank.
fun gradleTask(messages: TerminalCompletionMessages, sourceId: String, tasksProvider: suspend (TerminalCompletionRequest, TerminalCompletionContext) -> List<TerminalGradleTask>): TerminalCompletionSource
Creates Gradle task completion with localized fallback descriptions; imported task documentation is preserved.