TheDocumentation Index
Fetch the complete documentation index at: https://docs.grounds.gg/llms.txt
Use this file to discover all available pages before exploring further.
gg.grounds.push Gradle plugin is what actually uploads your JAR to forge. The CLI’s grounds push is a thin wrapper around its tasks.
gg.grounds.push is separate from the convention-plugin bundle (gg.grounds.paper-conventions, gg.grounds.kotlin-conventions, …). The conventions plugins shape your build; push ships its output. You almost certainly want both.Prerequisites
- A GitHub personal access token with
read:packagesscope (the plugin lives on GitHub Packages). - Gradle 8+ and JDK 21+.
- A
shadowJarorjartask that produces the artifact you want to push.
Add the plugin repository
Insettings.gradle.kts:
settings.gradle.kts
~/.gradle/gradle.properties:
~/.gradle/gradle.properties
Apply the plugin
In your plugin module’sbuild.gradle.kts (the one that produces the JAR):
build.gradle.kts
| Task | Purpose |
|---|---|
groundsPush | Upload + build + deploy. |
groundsPushRetry | Re-run a failed pipeline using server-stored JAR. |
groundsPromote | Promote a successful push to a higher target (currently in beta). |
groundsTestLocal | Run Paper/Velocity locally with this plugin loaded — offline dev loop. |
The groundsPush extension
For most projects you don’t need to touch this — the plugin auto-detects everything. But it’s useful for power users:
build.gradle.kts
grounds push from the CLI uses.
JAR auto-detection
AtafterEvaluate, the plugin looks for tasks named (in order) shadowJar, jar, and wires the first one found as both the JAR source and a build dependency. So:
build.gradle.kts
groundsPush will:
- Trigger
shadowJar. - Read its output JAR.
- Upload it.
jarFile only if you have multiple JARs or use a non-standard packaging task.
Project layout
The plugin runs per Gradle project (perbuild.gradle.kts). For a multi-module repo where only one module is the deployable, apply it only there:
Then run from the repo root:
cd plugin && grounds push --target=staging.
Authentication
The plugin reads a bearer token from, in order:GROUNDS_TOKENenvironment variable.- The credentials file written by
grounds login.
GROUNDS_TOKEN to a service-account token. Don’t commit credentials.json.