Skip to content

Instance Method

streamingGradle()

Returns a Gradle builder configured to stream output live for long-running builds.

func streamingGradle() -> Gradle

Discussion

Builds on gradle() and additionally:

  • Routes stdout and stderr through SwiftyShell/OutputDestination/tee so Gradle’s progress is echoed to the parent process’s stdout/stderr as it is produced, while still being captured into ShellOutput.stdout for downstream parsing (e.g. AAB path, test counts, build summary).

  • Lifts the captured-output limit (outputLimit(0)) so a long --info/--scan build cannot fail by exceeding the default capture cap.

Use this for the long-running Android Gradle invocations (archive/build/test) where live progress matters in CI; prefer gradle() for short, purely-parsed invocations.

In --output json mode (jsonOutput) this falls back to plain gradle() capture so streamed build progress does not interleave with the JSON result on stdout.