From 041e11f4a93e6a185c3da345f0f07442c6ded5e5 Mon Sep 17 00:00:00 2001 From: piexel Date: Tue, 10 Nov 2026 10:08:31 +0100 Subject: [PATCH] Gate mavenLocal behind -PuseMavenLocal and resolve ItemsAdder remotely A stale ~/.m2 artifact could shadow the composite VolmLib or published artifacts, and ItemsAdder only resolved through mavenLocal. mavenLocal() is now added only with -PuseMavenLocal=true or when the composite VolmLib is off, and ItemsAdder uses beer.devs:itemsadder-api 4.0.17 from maven.devs.beer. Upstream: c83d6964f --- build.gradle | 8 +++++++- gradle/libs.versions.toml | 4 ++-- publish-volmlib.sh | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index a2559ebb0..c35babb1b 100644 --- a/build.gradle +++ b/build.gradle @@ -58,6 +58,10 @@ String volmLibCoordinate = providers.gradleProperty('volmLibCoordinate') .get() String useLocalVolmLib = providers.gradleProperty('useLocalVolmLib').getOrElse('true') String localVolmLibDirectory = providers.gradleProperty('localVolmLibDirectory').getOrNull() +boolean useMavenLocal = providers.gradleProperty('useMavenLocal') + .orElse(useLocalVolmLib.equalsIgnoreCase('true') ? 'false' : 'true') + .map { String value -> value.equalsIgnoreCase('true') } + .get() Closure loaderDisplayVersion = { String loaderVersion -> String coordinatePrefix = "${minecraftVersion}-" if (loaderVersion.startsWith(coordinatePrefix)) { @@ -821,7 +825,9 @@ allprojects { } repositories { - mavenLocal() + if (useMavenLocal) { + mavenLocal() + } mavenCentral() maven { url = uri('https://repo.papermc.io/repository/maven-public/') } maven { url = uri('https://repo.codemc.org/repository/maven-public/') } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index edeb4b5cc..6b26ed83f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ jaxen = "2.0.6" # https://central.sonatype.com/artifact/jaxen/jaxen # Third Party Integrations nexo = "1.25.0" # https://repo.nexomc.com/#/releases/com/nexomc/nexo -itemsadder = "4.0.10" # https://github.com/LoneDev6/API-ItemsAdder +itemsadder = "4.0.17" # https://github.com/LoneDev6/API-ItemsAdder placeholderApi = "2.11.6" # https://repo.extendedclip.com/#/releases/me/clip/placeholderapi score = "5.25.3.9" # https://github.com/Ssomar-Developement/SCore mmoitems = "6.10.1-SNAPSHOT" # https://nexus.phoenixdevt.fr/repository/maven-public/net/Indyuce/MMOItems-API/maven-metadata.xml @@ -95,7 +95,7 @@ jaxen = { module = "jaxen:jaxen", version.ref = "jaxen" } # Third Party Integrations nexo = { module = "com.nexomc:nexo", version.ref = "nexo" } -itemsadder = { module = "dev.lone:api-itemsadder", version.ref = "itemsadder" } +itemsadder = { module = "beer.devs:itemsadder-api", version.ref = "itemsadder" } placeholderApi = { module = "me.clip:placeholderapi", version.ref = "placeholderApi" } score = { module = "com.github.Ssomar-Developement:SCore", version.ref = "score" } mmoitems = { module = "net.Indyuce:MMOItems-API", version.ref = "mmoitems" } diff --git a/publish-volmlib.sh b/publish-volmlib.sh index 322de2278..e375e0143 100644 --- a/publish-volmlib.sh +++ b/publish-volmlib.sh @@ -5,7 +5,8 @@ # # VolmLib is normally picked up as a composite build straight from source, so this is # only needed when you build with -PuseLocalVolmLib=false, or when another tool has to -# resolve VolmLib from ~/.m2 rather than from the included build. +# resolve VolmLib from ~/.m2 rather than from the included build. Gradle reads ~/.m2 only +# when -PuseMavenLocal=true is passed or the composite VolmLib is off (-PuseLocalVolmLib=false). # # The lookup mirrors settings.gradle: it walks up from this script looking for a # VolmLib checkout sitting beside the project root. Set VOLMLIB_DIR to override.