Refactor: Replace Rörledning with Cloud-Services (#3409)

* Refactor: Replace Rörledning with Cloud-Services

Cloud-Services is actually maintained, as opposed to Rörledning. Furthermore, Rörledning is available through Maven Central, whereas rörledning isn't.

This is a semi-breaking change, but because we relocate, it might be fine? Either way, this is a necessary change.

* build: Provide jsr at runtime

* Merge branch 'v6' into refactor/v6/cloud-services

Co-authored-by: NotMyFault <mc.cache@web.de>
This commit is contained in:
Alexander Söderberg 2021-12-31 15:49:11 +01:00 committed by GitHub
parent 07fdc94dd8
commit fd0c2050d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 14 deletions

View File

@ -75,7 +75,8 @@ tasks.named<ShadowJar>("shadowJar") {
relocate("org.khelekore.prtree", "com.plotsquared.prtree") relocate("org.khelekore.prtree", "com.plotsquared.prtree")
relocate("com.google.inject", "com.plotsquared.google") relocate("com.google.inject", "com.plotsquared.google")
relocate("org.aopalliance", "com.plotsquared.core.aopalliance") relocate("org.aopalliance", "com.plotsquared.core.aopalliance")
relocate("com.intellectualsites.services", "com.plotsquared.core.services") relocate("cloud.commandframework.services", "com.plotsquared.core.services")
relocate("io.leangen.geantyref", "com.plotsquared.core.geantyref")
relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika") relocate("com.intellectualsites.arkitektonika", "com.plotsquared.core.arkitektonika")
relocate("com.intellectualsites.http", "com.plotsquared.core.http") relocate("com.intellectualsites.http", "com.plotsquared.core.http")
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster") relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
@ -83,6 +84,7 @@ tasks.named<ShadowJar>("shadowJar") {
relocate("org.jetbrains", "com.plotsquared.core.annotations") relocate("org.jetbrains", "com.plotsquared.core.annotations")
relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations") relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations")
relocate("javax.annotation", "com.plotsquared.core.annotation") relocate("javax.annotation", "com.plotsquared.core.annotation")
relocate("com.google.code.findbugs", "com.plotsquared.core.findbugs")
relocate("javax.inject", "com.plotsquared.core.annotation.inject") relocate("javax.inject", "com.plotsquared.core.annotation.inject")
// Get rid of all the libs which are 100% unused. // Get rid of all the libs which are 100% unused.

View File

@ -22,7 +22,7 @@ dependencies {
api(libs.guiceassistedinject) { api(libs.guiceassistedinject) {
exclude("com.google.inject", "guice") exclude("com.google.inject", "guice")
} }
compileOnlyApi(libs.findbugs) api(libs.findbugs)
// Plugins // Plugins
compileOnly(libs.worldeditCore) { compileOnly(libs.worldeditCore) {
@ -40,9 +40,7 @@ dependencies {
// Other libraries // Other libraries
api(libs.prtree) api(libs.prtree)
api(libs.aopalliance) api(libs.aopalliance)
api(libs.rorledning) { api(libs.cloudServices)
exclude(group = "com.google.guava")
}
api(libs.arkitektonika) api(libs.arkitektonika)
api(libs.paster) api(libs.paster)
} }

View File

@ -25,10 +25,10 @@
*/ */
package com.plotsquared.core; package com.plotsquared.core;
import cloud.commandframework.services.ServicePipeline;
import com.google.inject.Injector; import com.google.inject.Injector;
import com.google.inject.Key; import com.google.inject.Key;
import com.google.inject.TypeLiteral; import com.google.inject.TypeLiteral;
import com.intellectualsites.services.ServicePipeline;
import com.plotsquared.core.backup.BackupManager; import com.plotsquared.core.backup.BackupManager;
import com.plotsquared.core.configuration.caption.LocaleHolder; import com.plotsquared.core.configuration.caption.LocaleHolder;
import com.plotsquared.core.generator.GeneratorWrapper; import com.plotsquared.core.generator.GeneratorWrapper;

View File

@ -25,9 +25,8 @@
*/ */
package com.plotsquared.core.command; package com.plotsquared.core.command;
import com.google.common.reflect.TypeToken; import cloud.commandframework.services.ServicePipeline;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.intellectualsites.services.ServicePipeline;
import com.plotsquared.core.PlotSquared; import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings; import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.configuration.caption.TranslatableCaption; import com.plotsquared.core.configuration.caption.TranslatableCaption;
@ -51,6 +50,7 @@ import com.plotsquared.core.util.PlotExpression;
import com.plotsquared.core.util.task.AutoClaimFinishTask; import com.plotsquared.core.util.task.AutoClaimFinishTask;
import com.plotsquared.core.util.task.RunnableVal; import com.plotsquared.core.util.task.RunnableVal;
import com.plotsquared.core.util.task.TaskManager; import com.plotsquared.core.util.task.TaskManager;
import io.leangen.geantyref.TypeToken;
import net.kyori.adventure.text.minimessage.Template; import net.kyori.adventure.text.minimessage.Template;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable; import org.checkerframework.checker.nullness.qual.Nullable;
@ -84,7 +84,7 @@ public class Auto extends SubCommand {
this.eventDispatcher = eventDispatcher; this.eventDispatcher = eventDispatcher;
this.econHandler = econHandler; this.econHandler = econHandler;
this.servicePipeline = servicePipeline; this.servicePipeline = servicePipeline;
this.servicePipeline.registerServiceType(TypeToken.of(AutoService.class), new AutoService.DefaultAutoService()); this.servicePipeline.registerServiceType(TypeToken.get(AutoService.class), new AutoService.DefaultAutoService());
final AutoService.MultiPlotService multiPlotService = new AutoService.MultiPlotService(); final AutoService.MultiPlotService multiPlotService = new AutoService.MultiPlotService();
this.servicePipeline.registerServiceImplementation(AutoService.class, multiPlotService, this.servicePipeline.registerServiceImplementation(AutoService.class, multiPlotService,
Collections.singletonList(multiPlotService) Collections.singletonList(multiPlotService)

View File

@ -25,8 +25,8 @@
*/ */
package com.plotsquared.core.inject.modules; package com.plotsquared.core.inject.modules;
import cloud.commandframework.services.ServicePipeline;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;
import com.intellectualsites.services.ServicePipeline;
import com.plotsquared.core.PlotSquared; import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.file.YamlConfiguration; import com.plotsquared.core.configuration.file.YamlConfiguration;
import com.plotsquared.core.inject.annotations.BackgroundPipeline; import com.plotsquared.core.inject.annotations.BackgroundPipeline;

View File

@ -25,9 +25,9 @@
*/ */
package com.plotsquared.core.services.plots; package com.plotsquared.core.services.plots;
import cloud.commandframework.services.types.Service;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
import com.intellectualsites.services.types.Service;
import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot; import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.PlotArea; import com.plotsquared.core.plot.PlotArea;

View File

@ -32,6 +32,11 @@ allprojects {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/") url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
} }
maven {
name = "Sonatype OSS (S01)"
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
}
maven { maven {
name = "Jitpack" name = "Jitpack"
url = uri("https://jitpack.io") url = uri("https://jitpack.io")

View File

@ -18,7 +18,7 @@ adventure-platform-bukkit = "4.0.1"
# Plugins # Plugins
worldedit = "7.2.8" worldedit = "7.2.8"
fawe = "1.17-419" fawe = "2.0.0-SNAPSHOT"
vault = "1.7.1" vault = "1.7.1"
placeholderapi = "2.11.1" placeholderapi = "2.11.1"
luckperms = "5.3" luckperms = "5.3"
@ -29,7 +29,7 @@ mvdwapi = "3.1.1"
# Third party # Third party
prtree = "2.0.0" prtree = "2.0.0"
aopalliance = "1.0" aopalliance = "1.0"
rorledning = "1.4.0-SNAPSHOT" cloud-services = "1.6.0"
arkitektonika = "2.1.1" arkitektonika = "2.1.1"
paster = "1.1.3" paster = "1.1.3"
bstats = "2.2.1" bstats = "2.2.1"
@ -78,7 +78,7 @@ hyperverse = { group = "se.hyperver.hyperverse", name = "Core", version.ref = "h
# Third party # Third party
prtree = { group = "com.intellectualsites.prtree", name = "PRTree", version.ref = "prtree" } prtree = { group = "com.intellectualsites.prtree", name = "PRTree", version.ref = "prtree" }
aopalliance = { group = "aopalliance", name = "aopalliance", version.ref = "aopalliance" } aopalliance = { group = "aopalliance", name = "aopalliance", version.ref = "aopalliance" }
rorledning = { group = "com.intellectualsites", name = "Pipeline", version.ref = "rorledning" } cloudServices = { group = "cloud.commandframework", name = "cloud-services", version.ref = "cloud-services" }
mvdwapi = { group = "com.intellectualsites.mvdwplaceholderapi", name = "MVdWPlaceholderAPI", version.ref = "mvdwapi" } mvdwapi = { group = "com.intellectualsites.mvdwplaceholderapi", name = "MVdWPlaceholderAPI", version.ref = "mvdwapi" }
squirrelid = { group = "org.enginehub", name = "squirrelid", version.ref = "squirrelid" } squirrelid = { group = "org.enginehub", name = "squirrelid", version.ref = "squirrelid" }
serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" } serverlib = { group = "dev.notmyfault.serverlib", name = "ServerLib", version.ref = "serverlib" }