java-sdk
Runtime module for the Java SDK
Installation
dagger install github.com/lgtdio/dagger/sdk/java@fd9472a729428fc3d253c2403431670b36b64ec7Entrypoint
Return Type
JavaSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sdkSourceDir | Directory | - | Directory with the Java SDK source code. dagger-java-samples is not necessary to build, but as it's referenced in the root pom.xml maven will check if it's there. So we keep it, until a better solution (like to extract the samples somewhere else) |
Example
dagger -m github.com/lgtdio/dagger/sdk/java@fd9472a729428fc3d253c2403431670b36b64ec7 call \
func (m *MyModule) Example() *dagger.JavaSdk {
return dag.
JavaSdk()
}@function
def example() -> dagger.JavaSdk:
return (
dag.java_sdk()
)@func()
example(): JavaSdk {
return dag
.javaSdk()
}Types
JavaSdk 🔗
sdksourceDir() 🔗
Return Type
Directory ! Example
dagger -m github.com/lgtdio/dagger/sdk/java@fd9472a729428fc3d253c2403431670b36b64ec7 call \
sdksource-dirfunc (m *MyModule) Example() *dagger.Directory {
return dag.
JavaSdk().
SdksourceDir()
}@function
def example() -> dagger.Directory:
return (
dag.java_sdk()
.sdksource_dir()
)@func()
example(): Directory {
return dag
.javaSdk()
.sdksourceDir()
}requiredPaths() 🔗
Return Type
[String ! ] ! Example
dagger -m github.com/lgtdio/dagger/sdk/java@fd9472a729428fc3d253c2403431670b36b64ec7 call \
required-pathsfunc (m *MyModule) Example(ctx context.Context) []string {
return dag.
JavaSdk().
RequiredPaths(ctx)
}@function
async def example() -> List[str]:
return await (
dag.java_sdk()
.required_paths()
)@func()
async example(): Promise<string[]> {
return dag
.javaSdk()
.requiredPaths()
}codegen() 🔗
Return Type
GeneratedCode !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.GeneratedCode {
return dag.
JavaSdk().
Codegen(modSource, introspectionJson)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.GeneratedCode:
return (
dag.java_sdk()
.codegen(mod_source, introspection_json)
)@func()
example(modSource: ModuleSource, introspectionJson: File): GeneratedCode {
return dag
.javaSdk()
.codegen(modSource, introspectionJson)
}moduleRuntime() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.Container {
return dag.
JavaSdk().
ModuleRuntime(modSource, introspectionJson)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.Container:
return (
dag.java_sdk()
.module_runtime(mod_source, introspection_json)
)@func()
example(modSource: ModuleSource, introspectionJson: File): Container {
return dag
.javaSdk()
.moduleRuntime(modSource, introspectionJson)
}