Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

JavaAppResource.WithGradleTask

Method
📦 Aspire.Hosting.Java v17.0.0-preview.1.26565.2
type JavaAppResource interface {
// ... omitted for brevity
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().

Defined on

This method is defined on the following type: