Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v5

- name: Configure GitHub Packages credentials
run: |
mkdir -p ~/.gradle
{
echo "github.user=${{ github.actor }}"
echo "github.token=${{ secrets.GITHUB_TOKEN }}"
} > ~/.gradle/gradle.properties

- name: Publish package
env:
GITHUB_ACTOR: ${{ github.actor }}
Expand Down
76 changes: 1 addition & 75 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,75 +1 @@
plugins {
base
kotlin("jvm") version "2.3.0"
kotlin("kapt") version "2.3.0"
id("com.diffplug.spotless") version "8.1.0"
id("maven-publish")
}

allprojects {
apply(plugin = "com.diffplug.spotless")

repositories {
maven { url = uri("https://repo.papermc.io/repository/maven-public/") }
mavenCentral()
}

spotless {
kotlin {
ktfmt().googleStyle().configure {
it.setBlockIndent(4)
it.setContinuationIndent(4)
}
targetExclude("**/build/**")
}
kotlinGradle {
ktfmt().googleStyle().configure {
it.setBlockIndent(4)
it.setContinuationIndent(4)
}
targetExclude("**/build/**")
}
}
}

subprojects {
group = "gg.grounds"

val versionOverride = project.findProperty("versionOverride") as? String
version = versionOverride ?: "local-SNAPSHOT"

apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jetbrains.kotlin.kapt")
apply(plugin = "maven-publish")

kotlin { jvmToolchain(25) }

tasks.test {
useJUnitPlatform()

testLogging {
// Show assertion diffs in test output
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/groundsgg/${rootProject.name}")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}

publications {
create<MavenPublication>("java") {
from(components["java"])
artifactId = rootProject.name + "-" + project.name
}
}
}
}
plugins { id("gg.grounds.root") version "0.1.0" }
25 changes: 2 additions & 23 deletions paper/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
plugins { id("com.gradleup.shadow") version "9.3.0" }
plugins { id("gg.grounds.paper") version "0.1.0" }

dependencies {
implementation(project(":common"))
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
}

tasks.build { dependsOn(tasks.shadowJar) }

tasks.jar { enabled = false }

tasks.shadowJar {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("") // Removes the 'all' classifier
archiveVersion.set("") // Removes the version from the jar name
}

val pluginVersion = project.version.toString()

tasks.processResources {
inputs.property("version", project.version)

filesMatching(listOf("**/plugin.yml")) { expand("VERSION" to pluginVersion) }
}
dependencies { implementation(project(":common")) }
13 changes: 13 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
rootProject.name = "plugin-server-discovery"

include("common", "velocity", "paper")

pluginManagement {
repositories {
maven {
url = uri("https://maven.pkg.github.com/groundsgg/*")
credentials {
username = providers.gradleProperty("github.user").get()
password = providers.gradleProperty("github.token").get()
}
}
gradlePluginPortal()
}
}
30 changes: 2 additions & 28 deletions velocity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
plugins {
id("com.gradleup.shadow") version "9.3.0"
id("com.github.gmazzo.buildconfig") version "6.0.7"
}
plugins { id("gg.grounds.velocity") version "0.1.0" }

dependencies {
implementation(project(":common"))
compileOnly("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
kapt("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
}

tasks.build { dependsOn(tasks.shadowJar) }

tasks.jar { enabled = false }

tasks.shadowJar {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("") // Removes the 'all' classifier
archiveVersion.set("") // Removes the version from the jar name
}

buildConfig {
className("BuildInfo")
packageName("gg.grounds")

useKotlinOutput()

buildConfigField("String", "VERSION", "\"${project.version}\"")
}
dependencies { implementation(project(":common")) }