Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithGradleTask

Method
📦 Aspire.Hosting.Java v17.0.0-preview.1.26565.2
func (JavaAppResource) WithGradleTask(
task string,
args []string,
) JavaAppResource

Signature

methodWithGradleTaskbuilder
Launches the Java application through a Gradle task instead of java, for example bootRun.
WithGradleTask(
task string,
args []string,
) JavaAppResource
taskstringThe Gradle task to execute.
args[]stringAdditional arguments passed to the Gradle wrapper after the task.
JavaAppResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: