Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions build/gradle-plugin/setup.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
---
title: "Setup"
description: "Apply gg.grounds.push to your Gradle project."

Check warning on line 3 in build/gradle-plugin/setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/gradle-plugin/setup.mdx#L3

Did you really mean 'Gradle'?
---

The `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.

Check warning on line 6 in build/gradle-plugin/setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/gradle-plugin/setup.mdx#L6

Did you really mean 'Gradle'?

<Note>
`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.
</Note>

## Convention plugins

Grounds plugin repositories use convention plugins from `library-gradle-plugin` to shape JVM plugin artifacts:

- `gg.grounds.paper-conventions`
- `gg.grounds.velocity-conventions`
- `gg.grounds.paper-standalone-conventions`
- `gg.grounds.paper-runtime-consumer-conventions`
- `gg.grounds.paper-runtime-provider-conventions`
- `gg.grounds.velocity-standalone-conventions`
- `gg.grounds.velocity-runtime-consumer-conventions`
- `gg.grounds.velocity-runtime-provider-conventions`

Runtime-consumer conventions are for internal Paper and Velocity plugins that run with [`plugin-grounds-runtime`](/build/runtime-libraries). Standalone conventions are for plugins that must carry their own runtime libraries.

## Prerequisites

- A GitHub personal access token with `read:packages` scope (the plugin lives on GitHub Packages).
- Gradle 8+ and JDK 21+.

Check warning on line 30 in build/gradle-plugin/setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/gradle-plugin/setup.mdx#L30

Did you really mean 'Gradle'?
- A `shadowJar` or `jar` task that produces the artifact you want to push.

## Add the plugin repository
Expand All @@ -34,7 +49,7 @@
}
```

Storing creds in `~/.gradle/gradle.properties`:

Check warning on line 52 in build/gradle-plugin/setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/gradle-plugin/setup.mdx#L52

Did you really mean 'creds'?

```properties ~/.gradle/gradle.properties
github.user=your-github-handle
Expand Down Expand Up @@ -107,7 +122,7 @@

## Project layout

The plugin runs **per Gradle project** (per `build.gradle.kts`). For a multi-module repo where only one module is the deployable, apply it only there:

Check warning on line 125 in build/gradle-plugin/setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/gradle-plugin/setup.mdx#L125

Did you really mean 'Gradle'?

```mermaid
flowchart TB
Expand Down
54 changes: 54 additions & 0 deletions build/runtime-libraries.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "Runtime libraries"
description: "Share selected JVM libraries through plugin-grounds-runtime for Paper and Velocity plugins."
---

`plugin-grounds-runtime` is an internal Paper and Velocity plugin that provides selected shared JVM libraries to Grounds plugins at runtime.

Runtime-consumer conventions automatically add baseline shared runtime libraries to the compile-only classpath. Plugin modules should not declare those libraries as implementation dependencies and must not bundle them in their shadow JARs.

Check warning on line 8 in build/runtime-libraries.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/runtime-libraries.mdx#L8

Did you really mean 'classpath'?

## When to use runtime consumers

Use runtime-consumer conventions for internal Paper and Velocity plugins that run on Grounds base images and can require `plugin-grounds-runtime` in local, dev, test, and production environments.

Use standalone conventions when a plugin must run without `plugin-grounds-runtime`.

## Provided libraries

- Kotlin standard library family
- Kotlin coroutines

Check warning on line 19 in build/runtime-libraries.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/runtime-libraries.mdx#L19

Did you really mean 'coroutines'?
- protobuf-java
- gRPC baseline modules

## Not provided

- Paper API
- Velocity API
- Minestom

Check warning on line 27 in build/runtime-libraries.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/runtime-libraries.mdx#L27

Did you really mean 'Minestom'?
- Plugin-specific clients such as NATS
- Jackson and other private implementation dependencies

## Gradle convention IDs

Check warning on line 31 in build/runtime-libraries.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/runtime-libraries.mdx#L31

Did you really mean 'Gradle'?

- `gg.grounds.paper-standalone-conventions`
- `gg.grounds.paper-runtime-consumer-conventions`
- `gg.grounds.paper-runtime-provider-conventions`
- `gg.grounds.velocity-standalone-conventions`
- `gg.grounds.velocity-runtime-consumer-conventions`
- `gg.grounds.velocity-runtime-provider-conventions`

## Migrating a plugin

1. Switch Paper or Velocity modules to runtime-consumer conventions.
2. Remove shared runtime libraries from `implementation`.
3. Keep plugin-private dependencies as `implementation`.
4. Keep test-only runtime requirements in `testImplementation`.
5. Add the loader dependency on `plugin-grounds-runtime`.
6. Build and inspect the final shadow JAR.
7. Run the plugin locally with the matching runtime plugin installed.

## Debugging

Run `/grounds-runtime` in Paper or Velocity to inspect the installed runtime version, platform, manifest source, and provided libraries.

Runtime-consumer artifacts do not have a standalone fallback. Local, dev, test, and production environments must install the matching `plugin-grounds-runtime` plugin.
12 changes: 12 additions & 0 deletions build/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
✗ not a Gradle project? Run 'grounds init' to scaffold, or cd to your project root
```

You're running `grounds push` outside a Gradle project. `cd` to the directory with `gradlew` / `build.gradle.kts`.

Check warning on line 42 in build/troubleshooting.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/troubleshooting.mdx#L42

Did you really mean 'Gradle'?

## Manifest

Expand All @@ -61,6 +61,18 @@

Local mode only runs Paper and Velocity. Use `grounds push --target=dev` for `minestom` / `service` workloads.

### Runtime consumer starts without `plugin-grounds-runtime`

Runtime-consumer artifacts do not have a standalone fallback. Install the matching `plugin-grounds-runtime` Paper or Velocity plugin in local, dev, test, and production environments.

Use `/grounds-runtime` to confirm the runtime plugin is loaded and to inspect the runtime version, platform, manifest source, and provided libraries.

### Runtime consumer bundles shared libraries

Runtime-consumer builds fail when the final shadow JAR includes shared runtime packages such as `io/grpc`, `com/google/protobuf`, `kotlinx/coroutines`, or `kotlin`.

Remove those libraries from `implementation` and rely on the runtime-consumer compile-only baseline. Keep plugin-private dependencies, such as NATS or Jackson, as `implementation`. If tests need a shared runtime library on the test runtime classpath, add it to `testImplementation`.

Check warning on line 74 in build/troubleshooting.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/troubleshooting.mdx#L74

Did you really mean 'classpath'?

### `unknown baseImage`

Your manifest references a base image source key that Forge does not know, or that is not allowed for the selected `type`.
Expand Down Expand Up @@ -108,7 +120,7 @@

- `./gradlew shadowJar` produces something at `build/libs/`.
- The glob in `grounds.yaml` (or auto-detected) matches it.
- The Gradle plugin successfully built before upload (look at the build output).

Check warning on line 123 in build/troubleshooting.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/troubleshooting.mdx#L123

Did you really mean 'Gradle'?

### Build hangs in `building` for >5 minutes

Expand Down Expand Up @@ -144,7 +156,7 @@

### `OOMKilled`

Pod exceeded its memory limit. Bump `resources.memory` in `grounds.yaml` (within project quota), or shrink your heap. Check Grafana for the JVM heap usage that led up to the OOM.

Check warning on line 159 in build/troubleshooting.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/troubleshooting.mdx#L159

Did you really mean 'Grafana'?

### Quota exceeded at admission

Expand Down Expand Up @@ -174,7 +186,7 @@
grounds logs deployment <name>
```

The hostname only routes to a `ready` pod — during a redeploy or crashloop you'll see 502 from the ingress.

Check warning on line 189 in build/troubleshooting.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/troubleshooting.mdx#L189

Did you really mean 'hostname'?

Check warning on line 189 in build/troubleshooting.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/troubleshooting.mdx#L189

Did you really mean 'crashloop'?

## Auth & Grounds Account

Expand All @@ -187,7 +199,7 @@

If you used a service-account token, it's hard-pinned to its minting project — you cannot use it elsewhere.

### Browser opens to "invalid_redirect_uri"

Check warning on line 202 in build/troubleshooting.mdx

View check run for this annotation

Mintlify / Mintlify Validation (grounds) - vale-spellcheck

build/troubleshooting.mdx#L202

Did you really mean 'invalid_redirect_uri'?

The CLI's redirect URI must match what's configured for Grounds Account. If you self-host the identity provider or the CLI binary is stale, this can drift. Re-install the CLI.

Expand Down
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"build/concepts/targets",
"build/concepts/pushes",
"build/concepts/base-images",
"build/runtime-libraries",
"build/concepts/preview-environments"
]
},
Expand Down
Loading