gradle
No long description provided.
Installation
dagger install github.com/matipan/daggerverse/gradle@28815a9f7ec2d43c52e24c19916e80c01903e591
Types
Gradle 🔗
version() 🔗
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Gradle().
Version(ctx)
}
image() 🔗
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Gradle().
Image(ctx)
}
directory() 🔗
Return Type
Directory !
Example
func (m *myModule) example() *Directory {
return dag.
Gradle().
Directory()
}
wrapper() 🔗
Return Type
Boolean !
Example
func (m *myModule) example(ctx context.Context) bool {
return dag.
Gradle().
Wrapper(ctx)
}
withDirectory() 🔗
WithDirectory mounts the directory of the application that will be potentially built.
Return Type
Gradle !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
Example
func (m *myModule) example(src *Directory) *Gradle {
return dag.
Gradle().
WithDirectory(src)
}
withWrapper() 🔗
WithWrapper enables the use of gradlew
instead of using the gradle installed
in the image. If WithWrapper
is called, it is not necessary to set a specific
version or image.
Return Type
Gradle !
Example
func (m *myModule) example() *Gradle {
return dag.
Gradle().
WithWrapper()
}
fromVersion() 🔗
FromVersion sets the gradle version to be used. If not set, the default
version will be used specified by the DefaultGradleVersion
constant.
Return Type
Gradle !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | - | No description provided |
Example
func (m *myModule) example(version string) *Gradle {
return dag.
Gradle().
FromVersion(version)
}
fromImage() 🔗
FromImage sets the image to be used as the base image for the gradle container.
Keep in mind that if WithWrapper
is not specified this image must have
gradle installed.
Return Type
Gradle !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | No description provided |
Example
func (m *myModule) example(image string) *Gradle {
return dag.
Gradle().
FromImage(image)
}
container() 🔗
Container returns a container with gradle, caching and directories mounted and ready to be used. You can use this if for any reason the available functions are not enough.
Return Type
Container !
Example
func (m *myModule) example() *Container {
return dag.
Gradle().
Container()
}
build() 🔗
Build runs a clean build.
Return Type
Container !
Example
func (m *myModule) example() *Container {
return dag.
Gradle().
Build()
}
test() 🔗
Test runs a clean test.
Return Type
Container !
Example
func (m *myModule) example() *Container {
return dag.
Gradle().
Test()
}
task() 🔗
Task allows you to run any custom gradle task you would like.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
task | String ! | - | No description provided |
args | [String ! ] ! | - | No description provided |
Example
func (m *myModule) example(task string, args []string) *Container {
return dag.
Gradle().
Task(task, args)
}