mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-19 14:59:27 +00:00
Gradle: avoid cross-configuration and enable configuration-on-demand (#5012)
This commit is contained in:
@@ -12,9 +12,14 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// This is for the LibsAccessor.kt hack
|
||||
// this is OK as long as the same version catalog is used in the main build and build-logic
|
||||
// see https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
|
||||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||
|
||||
// This is for applying plugins, and using the version from the libs.versions.toml
|
||||
// Unfortunately they still need to be applied by their string name in the convention scripts.
|
||||
implementation(libs.lombok)
|
||||
implementation(libs.indra)
|
||||
implementation(libs.shadow)
|
||||
implementation(libs.architectury.plugin)
|
||||
|
||||
@@ -8,4 +8,4 @@ dependencyResolutionManagement {
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "build-logic"
|
||||
rootProject.name = "build-logic"
|
||||
|
||||
@@ -3,9 +3,10 @@ plugins {
|
||||
id("net.kyori.indra")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("org.checkerframework", "checker-qual", "3.19.0")
|
||||
}
|
||||
val rootProperties: Map<String, *> = project.rootProject.properties
|
||||
group = rootProperties["group"] as String + "." + rootProperties["id"] as String
|
||||
version = rootProperties["version"] as String
|
||||
description = rootProperties["description"] as String
|
||||
|
||||
indra {
|
||||
github("GeyserMC", "Geyser") {
|
||||
@@ -20,18 +21,52 @@ indra {
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
// Spigot, BungeeCord, Velocity, Fabric, ViaProxy, NeoForge
|
||||
filesMatching(listOf("plugin.yml", "bungee.yml", "velocity-plugin.json", "fabric.mod.json", "viaproxy.yml", "META-INF/neoforge.mods.toml")) {
|
||||
expand(
|
||||
"id" to "geyser",
|
||||
"name" to "Geyser",
|
||||
"version" to project.version,
|
||||
"description" to project.description,
|
||||
"url" to "https://geysermc.org",
|
||||
"author" to "GeyserMC"
|
||||
)
|
||||
}
|
||||
dependencies {
|
||||
compileOnly("org.checkerframework", "checker-qual", libs.checker.qual.get().version)
|
||||
}
|
||||
|
||||
repositories {
|
||||
// mavenLocal()
|
||||
|
||||
mavenCentral()
|
||||
|
||||
// Floodgate, Cumulus etc.
|
||||
maven("https://repo.opencollab.dev/main")
|
||||
|
||||
// Paper, Velocity
|
||||
maven("https://repo.papermc.io/repository/maven-public")
|
||||
|
||||
// Spigot
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots") {
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
}
|
||||
|
||||
// BungeeCord
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots") {
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
|
||||
// NeoForge
|
||||
maven("https://maven.neoforged.net/releases") {
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
|
||||
// Minecraft
|
||||
maven("https://libraries.minecraft.net") {
|
||||
name = "minecraft"
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
|
||||
// ViaVersion
|
||||
maven("https://repo.viaversion.com") {
|
||||
name = "viaversion"
|
||||
}
|
||||
|
||||
// Jitpack for e.g. MCPL
|
||||
maven("https://jitpack.io") {
|
||||
content { includeGroupByRegex("com\\.github\\..*") }
|
||||
}
|
||||
|
||||
// For Adventure snapshots
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
repositories {
|
||||
// mavenLocal()
|
||||
|
||||
mavenCentral()
|
||||
|
||||
// Floodgate, Cumulus etc.
|
||||
maven("https://repo.opencollab.dev/main")
|
||||
|
||||
// Paper, Velocity
|
||||
maven("https://repo.papermc.io/repository/maven-public")
|
||||
|
||||
// Spigot
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots") {
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
|
||||
// BungeeCord
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots") {
|
||||
mavenContent { snapshotsOnly() }
|
||||
}
|
||||
|
||||
// NeoForge
|
||||
maven("https://maven.neoforged.net/releases") {
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
|
||||
// Minecraft
|
||||
maven("https://libraries.minecraft.net") {
|
||||
name = "minecraft"
|
||||
mavenContent { releasesOnly() }
|
||||
}
|
||||
|
||||
// ViaVersion
|
||||
maven("https://repo.viaversion.com") {
|
||||
name = "viaversion"
|
||||
}
|
||||
|
||||
// Jitpack for e.g. MCPL
|
||||
maven("https://jitpack.io") {
|
||||
content { includeGroupByRegex("com\\.github\\..*") }
|
||||
}
|
||||
|
||||
// For Adventure snapshots
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
}
|
||||
@@ -2,11 +2,9 @@
|
||||
|
||||
import net.fabricmc.loom.task.RemapJarTask
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.maven
|
||||
|
||||
plugins {
|
||||
id("geyser.build-logic")
|
||||
id("geyser.publish-conventions")
|
||||
id("geyser.platform-conventions")
|
||||
id("architectury-plugin")
|
||||
id("dev.architectury.loom")
|
||||
}
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
plugins {
|
||||
id("geyser.publish-conventions")
|
||||
}
|
||||
id("io.freefair.lombok")
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
// Spigot, BungeeCord, Velocity, Fabric, ViaProxy, NeoForge
|
||||
filesMatching(listOf("plugin.yml", "bungee.yml", "velocity-plugin.json", "fabric.mod.json", "viaproxy.yml", "META-INF/neoforge.mods.toml")) {
|
||||
expand(
|
||||
"id" to "geyser",
|
||||
"name" to "Geyser",
|
||||
"version" to project.version,
|
||||
"description" to project.description,
|
||||
"url" to "https://geysermc.org",
|
||||
"author" to "GeyserMC"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user