java
No long description provided.
Installation
dagger install github.com/raghavendramallela/daggermodules/java@a53938e103d74a13cffc5da5487c3b9cc2d9e7cb
Entrypoint
Return Type
Java
Example
dagger -m github.com/raghavendramallela/daggermodules/java@a53938e103d74a13cffc5da5487c3b9cc2d9e7cb call \
func (m *myModule) example() *Java {
return dag.
Java()
}
@function
def example() -> dag.Java:
return (
dag.java()
)
@func()
example(): Java {
return dag
.java()
}
Types
Java 🔗
gradleBuild() 🔗
Build using gradle-wrapper
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
javaVersion | String | "21" | No description provided |
gradleTasks | [String ! ] ! | - | provide gradle-tasks (eg: --gradle-tasks='downloadRepos,installDist') -these will be executed after ./gradlew [] |
src | Directory ! | - | source code directory path containing gradle-wrapper(eg: --src=.) |
Example
dagger -m github.com/raghavendramallela/daggermodules/java@a53938e103d74a13cffc5da5487c3b9cc2d9e7cb call \
gradle-build --gradle-tasks string1 --gradle-tasks string2 --src DIR_PATH
func (m *myModule) example(gradleTasks []string, src *Directory) *Directory {
return dag.
Java().
GradleBuild(gradleTasks, src)
}
@function
def example(gradle_tasks: List[str], src: dagger.Directory) -> dagger.Directory:
return (
dag.java()
.gradle_build(gradle_tasks, src)
)
@func()
example(gradleTasks: string[], src: Directory): Directory {
return dag
.java()
.gradleBuild(gradleTasks, src)
}
gradlePublish() 🔗
Publish the gradle-build
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
javaVersion | String | "21" | No description provided |
gradleTasks | [String ! ] ! | - | provide gradle-tasks (eg: --gradle-tasks='downloadRepos,installDist') -these will be executed sequentially with ./gradlew [] |
ociRegistry | String | "docker.io" | oci-registry the image to be published to |
ociUsername | String ! | - | username to authenticate with the oci registry |
ociPassword | Secret ! | - | password/token to authenticate with the oci registry |
ociRegistryRepository | String ! | - | repository in the oci-registry, the image to be published to (usually oci-username for docker.io) |
imageName | String ! | - | image name (eg: --image-name=myapp) |
imageTag | String ! | - | image tag (eg: --image-tag=v1a1) |
src | Directory ! | - | source code directory path containing gradle-wrapper(eg: --src=.) |
Example
dagger -m github.com/raghavendramallela/daggermodules/java@a53938e103d74a13cffc5da5487c3b9cc2d9e7cb call \
gradle-publish --gradle-tasks string1 --gradle-tasks string2 --oci-username string --oci-password env:MYSECRET --oci-registry-repository string --image-name string --image-tag string --src DIR_PATH
func (m *myModule) example(ctx context.Context, gradleTasks []string, ociUsername string, ociPassword *Secret, ociRegistryRepository string, imageName string, imageTag string, src *Directory) string {
return dag.
Java().
GradlePublish(ctxgradleTasks, ociUsername, ociPassword, ociRegistryRepository, imageName, imageTag, src)
}
@function
async def example(gradle_tasks: List[str], oci_username: str, oci_password: dagger.Secret, oci_registry_repository: str, image_name: str, image_tag: str, src: dagger.Directory) -> str:
return await (
dag.java()
.gradle_publish(gradle_tasks, oci_username, oci_password, oci_registry_repository, image_name, image_tag, src)
)
@func()
async example(gradleTasks: string[], ociUsername: string, ociPassword: Secret, ociRegistryRepository: string, imageName: string, imageTag: string, src: Directory): Promise<string> {
return dag
.java()
.gradlePublish(gradleTasks, ociUsername, ociPassword, ociRegistryRepository, imageName, imageTag, src)
}