Prerequisites
Before installing the plugins, ensure you have:- Gradle 7.0 or higher
- A GitHub account with access to the
groundsggorganization - A GitHub personal access token with
read:packagespermission
Step 1: 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
Step 2: Configure Gradle Properties
Add your GitHub credentials to~/.gradle/gradle.properties:
~/.gradle/gradle.properties
Step 3: Configure Plugin Management
Add the GitHub Packages repository to yourpluginManagement 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.Step 4: Apply the Plugin
Apply the appropriate plugin in yourbuild.gradle.kts file based on your project type:
Root Plugin
For root projects or shared configurations:build.gradle.kts
Paper Plugin
For Paper server plugin projects:build.gradle.kts
Velocity Plugin
For Velocity proxy plugin projects:build.gradle.kts
Step 5: Verify Installation
Verify the plugin is correctly installed by running: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
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 in yourbuild.gradle.kts:
build.gradle.kts