-
Notifications
You must be signed in to change notification settings - Fork 0
fix: update gradle plugin documentation to gradle convention plugin #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||||||||
| --- | ||||||||||||
| title: "Usage" | ||||||||||||
| description: "Step-by-step guide to install and configure the Gradle plugin bundle" | ||||||||||||
| --- | ||||||||||||
|
|
||||||||||||
| The plugins are published to GitHub Packages. To use them, you need to configure your project to access the GitHub Packages Maven repository. | ||||||||||||
|
|
@@ -9,7 +9,7 @@ | |||||||||||
|
|
||||||||||||
| Before installing the plugins, ensure you have: | ||||||||||||
|
|
||||||||||||
| - Gradle 7.0 or higher | ||||||||||||
| - A GitHub account with access to the `groundsgg` organization | ||||||||||||
| - A GitHub personal access token with `read:packages` permission | ||||||||||||
|
|
||||||||||||
|
|
@@ -17,7 +17,7 @@ | |||||||||||
|
|
||||||||||||
| 1. Go to GitHub Settings β Developer settings β Personal access tokens β Tokens (classic) | ||||||||||||
| 2. Click "Generate new token (classic)" | ||||||||||||
| 3. Give it a descriptive name (e.g., "Gradle Packages Access") | ||||||||||||
| 4. Select the `read:packages` scope | ||||||||||||
| 5. Generate the token and copy it immediately | ||||||||||||
|
|
||||||||||||
|
|
@@ -25,7 +25,7 @@ | |||||||||||
| Store your token securely. You won't be able to see it again after leaving the page. | ||||||||||||
| </Warning> | ||||||||||||
|
|
||||||||||||
| ## Step 2: Configure Gradle Properties | ||||||||||||
|
|
||||||||||||
| Add your GitHub credentials to `~/.gradle/gradle.properties`: | ||||||||||||
|
|
||||||||||||
|
|
@@ -59,35 +59,65 @@ | |||||||||||
|
|
||||||||||||
| ## Step 4: Apply the Plugin | ||||||||||||
|
|
||||||||||||
| Apply the appropriate plugin in your `build.gradle.kts` file based on your project type: | ||||||||||||
| Apply the base conventions plugin with a version, then add the conventions that match your project type: | ||||||||||||
|
|
||||||||||||
| ### Root Plugin | ||||||||||||
| ### Base Conventions (required) | ||||||||||||
|
|
||||||||||||
| For root projects or shared configurations: | ||||||||||||
| Apply once per project (usually in the root project): | ||||||||||||
|
|
||||||||||||
| ```kotlin build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.root") version "0.1.1" | ||||||||||||
| id("gg.grounds.base-conventions") version "0.3.0" | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ### Paper Plugin | ||||||||||||
| ### Kotlin Conventions | ||||||||||||
|
|
||||||||||||
| For Kotlin projects (typically shared/common modules): | ||||||||||||
|
|
||||||||||||
| ```kotlin build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.kotlin-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
Comment on lines
+74
to
+82
|
||||||||||||
|
|
||||||||||||
| ### Paper Conventions | ||||||||||||
|
|
||||||||||||
| For Paper server plugin projects: | ||||||||||||
|
|
||||||||||||
| ```kotlin build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.paper") version "0.1.1" | ||||||||||||
| id("gg.grounds.paper-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ### Velocity Plugin | ||||||||||||
| ### Velocity Conventions | ||||||||||||
|
|
||||||||||||
| For Velocity proxy plugin projects: | ||||||||||||
|
|
||||||||||||
| ```kotlin build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.velocity") version "0.1.1" | ||||||||||||
| id("gg.grounds.velocity-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ### Minestom Conventions | ||||||||||||
|
|
||||||||||||
| For Minestom server plugin projects: | ||||||||||||
|
|
||||||||||||
| ```kotlin build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.minestom-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ### gRPC Conventions | ||||||||||||
|
|
||||||||||||
| For gRPC projects: | ||||||||||||
|
|
||||||||||||
| ```kotlin build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.grpc-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
|
|
@@ -99,7 +129,22 @@ | |||||||||||
| ./gradlew tasks --all | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| You should see tasks provided by the plugin in the output. For example, with the root plugin, you'll see Spotless formatting tasks. | ||||||||||||
| You should see tasks provided by the plugin in the output. For example, with base conventions, you'll see Spotless formatting tasks. | ||||||||||||
|
|
||||||||||||
| ## 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` | ||||||||||||
|
|
||||||||||||
| ```kotlin | ||||||||||||
| dependencies { | ||||||||||||
| // Overrides the Paper version with a higher one | ||||||||||||
| compileOnly("io.papermc.paper:paper-api:1.21.12-R0.1-SNAPSHOT") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ## Multi-Module Projects | ||||||||||||
|
|
||||||||||||
|
|
@@ -123,25 +168,31 @@ | |||||||||||
| include("paper-plugin", "velocity-plugin") | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| Then apply the root plugin in the root `build.gradle.kts`: | ||||||||||||
| Then apply the base conventions in the root `build.gradle.kts`: | ||||||||||||
|
|
||||||||||||
| ```kotlin build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.root") version "0.1.1" | ||||||||||||
| id("gg.grounds.base-conventions") version "0.3.0" | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| And apply specific plugins in each subproject's `build.gradle.kts`: | ||||||||||||
| And apply specific conventions in each subproject's `build.gradle.kts`: | ||||||||||||
|
|
||||||||||||
| ```kotlin paper-plugin/build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.paper") version "0.1.1" | ||||||||||||
| id("gg.grounds.paper-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ```kotlin velocity-plugin/build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.velocity") version "0.1.1" | ||||||||||||
| id("gg.grounds.velocity-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
| ```kotlin grpc-module/build.gradle.kts | ||||||||||||
| plugins { | ||||||||||||
| id("gg.grounds.grpc-conventions") | ||||||||||||
| } | ||||||||||||
| ``` | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+193
to
198
|
||||||||||||
| ```kotlin grpc-module/build.gradle.kts | |
| plugins { | |
| id("gg.grounds.grpc-conventions") | |
| } | |
| ``` |
Uh oh!
There was an error while loading. Please reload this page.