gradle
No long description provided.
Installation
dagger install github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7
Entrypoint
Return Type
Gradle
Example
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
func (m *myModule) example() *Gradle {
return dag.
Gradle()
}
@function
def example() -> dag.Gradle:
return (
dag.gradle()
)
@func()
example(): Gradle {
return dag
.gradle()
}
Types
Gradle 🔗
version() 🔗
Return Type
String !
Example
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
version
func (m *myModule) example(ctx context.Context) string {
return dag.
Gradle().
Version(ctx)
}
@function
async def example() -> str:
return await (
dag.gradle()
.version()
)
@func()
async example(): Promise<string> {
return dag
.gradle()
.version()
}
image() 🔗
Return Type
String !
Example
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
image
func (m *myModule) example(ctx context.Context) string {
return dag.
Gradle().
Image(ctx)
}
@function
async def example() -> str:
return await (
dag.gradle()
.image()
)
@func()
async example(): Promise<string> {
return dag
.gradle()
.image()
}
directory() 🔗
Return Type
Directory !
Example
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
directory
func (m *myModule) example() *Directory {
return dag.
Gradle().
Directory()
}
@function
def example() -> dagger.Directory:
return (
dag.gradle()
.directory()
)
@func()
example(): Directory {
return dag
.gradle()
.directory()
}
wrapper() 🔗
Return Type
Boolean !
Example
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
wrapper
func (m *myModule) example(ctx context.Context) bool {
return dag.
Gradle().
Wrapper(ctx)
}
@function
async def example() -> bool:
return await (
dag.gradle()
.wrapper()
)
@func()
async example(): Promise<boolean> {
return dag
.gradle()
.wrapper()
}
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
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
with-directory --src DIR_PATH
func (m *myModule) example(src *Directory) *Gradle {
return dag.
Gradle().
WithDirectory(src)
}
@function
def example(src: dagger.Directory) -> dag.Gradle:
return (
dag.gradle()
.with_directory(src)
)
@func()
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
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
with-wrapper
func (m *myModule) example() *Gradle {
return dag.
Gradle().
WithWrapper()
}
@function
def example() -> dag.Gradle:
return (
dag.gradle()
.with_wrapper()
)
@func()
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
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
from-version --version string
func (m *myModule) example(version string) *Gradle {
return dag.
Gradle().
FromVersion(version)
}
@function
def example(version: str) -> dag.Gradle:
return (
dag.gradle()
.from_version(version)
)
@func()
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
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
from-image --image string
func (m *myModule) example(image string) *Gradle {
return dag.
Gradle().
FromImage(image)
}
@function
def example(image: str) -> dag.Gradle:
return (
dag.gradle()
.from_image(image)
)
@func()
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
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
container
func (m *myModule) example() *Container {
return dag.
Gradle().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.gradle()
.container()
)
@func()
example(): Container {
return dag
.gradle()
.container()
}
build() 🔗
Build runs a clean build.
Return Type
Container !
Example
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
build
func (m *myModule) example() *Container {
return dag.
Gradle().
Build()
}
@function
def example() -> dagger.Container:
return (
dag.gradle()
.build()
)
@func()
example(): Container {
return dag
.gradle()
.build()
}
test() 🔗
Test runs a clean test.
Return Type
Container !
Example
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
test
func (m *myModule) example() *Container {
return dag.
Gradle().
Test()
}
@function
def example() -> dagger.Container:
return (
dag.gradle()
.test()
)
@func()
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
dagger -m github.com/matipan/daggerverse/gradle@84cbdbe89185ad94690a9ada1cdfb79f1878ecd7 call \
task --task string --args string1 --args string2
func (m *myModule) example(task string, args []string) *Container {
return dag.
Gradle().
Task(task, args)
}
@function
def example(task: str, args: List[str]) -> dagger.Container:
return (
dag.gradle()
.task(task, args)
)
@func()
example(task: string, args: string[]): Container {
return dag
.gradle()
.task(task, args)
}