Prerequisites:
- Gradle 7.0 or higher
- A GitHub account with access to the
groundsggorganization - A GitHub personal access token with
read:packagespermission
Create GitHub Personal Access Token
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click “Generate new token (classic)”
- Give it a descriptive name (e.g., “Gradle Packages Access”)
- Select the
read:packagesscope - Generate the token and copy it immediately
Configure Gradle Properties
Add your GitHub credentials to
~/.gradle/gradle.properties:~/.gradle/gradle.properties
Configure Plugin Management
Add the GitHub Packages repository to your
pluginManagement block in settings.gradle.kts:settings.gradle.kts
The
gradlePluginPortal() should remain in the repositories list to allow Gradle to resolve other plugins from the Gradle Plugin Portal.Apply the Plugin
Apply the base conventions plugin with a version, then add the conventions that match your project type:
Base Conventions (required)
Apply once per project (usually in the root project):build.gradle.kts
Kotlin Conventions
For Kotlin projects (typically shared/common modules):build.gradle.kts
Paper Conventions
For Paper server plugin projects:build.gradle.kts
Velocity Conventions
For Velocity proxy plugin projects:build.gradle.kts
Minestom Conventions
For Minestom server plugin projects:build.gradle.kts
gRPC Conventions
For gRPC projects:build.gradle.kts
Overriding Paper, Velocity, or Minestom Versions
Your project can request a higher Paper, Velocity, or Minestom version by declaring it in dependencies. Lower versions are not supported.- Current Paper version:
1.21.11-R0.1-SNAPSHOT - Current Velocity version:
3.4.0-SNAPSHOT - Current Minestom version:
2026.01.08-1.21.11
Multi-Module Projects
For projects with multiple modules, configure the plugin management at the root level:settings.gradle.kts
build.gradle.kts:
build.gradle.kts
build.gradle.kts:
paper-plugin/build.gradle.kts
velocity-plugin/build.gradle.kts
grpc-module/build.gradle.kts
com.google.protobuf to gg.grounds.shaded.protobuf in the final jar. That keeps bundled protobuf classes isolated from the server runtime while leaving plain library modules unchanged.
Troubleshooting
Authentication Errors
If you encounter authentication errors:- Verify your GitHub token has
read:packagespermission - Check that
github.userandgithub.tokenare correctly set in your Gradle properties - Ensure the token hasn’t expired
Plugin Not Found
If Gradle cannot find the plugin:- Verify the repository URL is correct:
https://maven.pkg.github.com/groundsgg/* - Check that
gradlePluginPortal()is included in the repositories list - Ensure you’re using the correct plugin version (check GitHub Packages for available versions)
Version Updates
To update to a newer version, change the version number only ongg.grounds.base-conventions:
build.gradle.kts