Generated reference for the harmont Gradle API.
gradle
Callable singleton for the Gradle toolchain — access as hm.gradle.
Call directly to construct a GradleProject, or use the bare-form
action methods (gradle.build(), gradle.test(), etc.) for a
one-shot leaf.
gradle(*, path='.', jdk='21', kotlin=False, image=None, base=None) -> GradleProject| Parameter | Type | Default | Description |
|---|---|---|---|
path | str | '.' | Path to the project root (where build.gradle lives). |
jdk | str | '21' | JDK major version to install via apt. Must be one of |
"11", "17", or "21". | |||
kotlin | bool | False | When True, sets the label prefix to :kotlin: |
instead of :java:. The Gradle commands are identical. | |||
image | str | None | None | Local-mode Docker base image override. |
base | Step | None | None | Existing Step to attach to instead of emitting a fresh |
| apt-base step. |
Returns GradleProject — A GradleProject ready for action methods.
gradle.build()
build(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
gradle.lint()
lint(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
gradle.test()
test(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
GradleEntry
Callable singleton for the Gradle toolchain — access as hm.gradle.
Call directly to construct a GradleProject, or use the bare-form
action methods (gradle.build(), gradle.test(), etc.) for a
one-shot leaf.
GradleEntry.build()
build(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
GradleEntry.lint()
lint(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
GradleEntry.test()
test(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
GradleProject
Gradle (Java/Kotlin) project install chain — constructed via hm.gradle().
installed is the JDK-verify step. Action methods (build,
test, lint) attach leaves to installed.
Fields
| Field | Type | Default |
|---|---|---|
path | str | required |
installed | Step | required |
GradleProject.build()
build(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
GradleProject.lint()
lint(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
GradleProject.test()
test(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step