diff --git a/distributor-build-logic/src/main/kotlin/distributor.mindustry-conventions.gradle.kts b/distributor-build-logic/src/main/kotlin/distributor.mindustry-conventions.gradle.kts index b7f98a51..9a0032b4 100644 --- a/distributor-build-logic/src/main/kotlin/distributor.mindustry-conventions.gradle.kts +++ b/distributor-build-logic/src/main/kotlin/distributor.mindustry-conventions.gradle.kts @@ -7,7 +7,7 @@ plugins { id("fr.xpdustry.toxopid") } -val extension = project.extensions.findOrCreateExtension("module") +val extension = project.extensions.findOrCreateExtension(DistributorModuleExtension.EXTENSION_NAME) toxopid { compileVersion.set(libs.versions.mindustry) @@ -18,17 +18,27 @@ dependencies { mindustryDependencies() } +afterEvaluate { + dependencies { + for (dependency in extension.dependencies.get()) { + compileOnly(dependency) + } + } +} + tasks.runMindustryClient { mods.setFrom() } tasks.runMindustryServer { mods.from(tasks.shadowJar) - mods.from(extension.dependencies.map { projects -> projects.map { it.tasks.shadowJar } }) } -tasks.register("getArtifactPath") { - doLast { println(tasks.shadowJar.get().archiveFile.get().toString()) } +// Cursed way to collect dependent distributor modules +gradle.projectsEvaluated { + tasks.runMindustryServer { + mods.from(collectAllPluginDependencies()) + } } tasks.shadowJar { @@ -47,7 +57,7 @@ tasks.shadowJar { hidden = true, dependencies = extension.dependencies.get() - .map { it.extensions.getByType().identifier.get() } + .map { it.dependencyProject.extensions.getByType().identifier.get() } .toMutableList(), ) diff --git a/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts b/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts index d11166fc..969d4727 100644 --- a/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts +++ b/distributor-build-logic/src/main/kotlin/distributor.parent-conventions.gradle.kts @@ -37,7 +37,7 @@ tasks.dependencyUpdates { } } -tasks.register("dist") { +tasks.register("release") { dependsOn(tasks.build) from(rootProject.subprojects.filter { it.plugins.hasPlugin(ShadowJavaPlugin::class) }.map { it.tasks.named("shadowJar") }) into(temporaryDir) diff --git a/distributor-build-logic/src/main/kotlin/distributor.publish-conventions.gradle.kts b/distributor-build-logic/src/main/kotlin/distributor.publish-conventions.gradle.kts index 908ec12d..2dc21dc6 100644 --- a/distributor-build-logic/src/main/kotlin/distributor.publish-conventions.gradle.kts +++ b/distributor-build-logic/src/main/kotlin/distributor.publish-conventions.gradle.kts @@ -1,3 +1,5 @@ +import com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin + plugins { id("net.kyori.indra.publishing") } @@ -36,3 +38,11 @@ indra { } } } + +plugins.withType { + components.withType().forEach { + it.withVariantsFromConfiguration(project.configurations.named("shadowRuntimeElements").get()) { + skip() + } + } +} diff --git a/distributor-build-logic/src/main/kotlin/extensions.kt b/distributor-build-logic/src/main/kotlin/extensions.kt index c882b591..15d75fd6 100644 --- a/distributor-build-logic/src/main/kotlin/extensions.kt +++ b/distributor-build-logic/src/main/kotlin/extensions.kt @@ -1,9 +1,13 @@ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import net.kyori.mammoth.Extensions import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.Project +import org.gradle.api.artifacts.ProjectDependency import org.gradle.api.plugins.ExtensionContainer -import org.gradle.api.provider.Property -import org.gradle.api.provider.SetProperty +import org.gradle.api.tasks.TaskProvider +import org.gradle.kotlin.dsl.named +import org.gradle.kotlin.dsl.property +import org.gradle.kotlin.dsl.setProperty import org.gradle.kotlin.dsl.the internal val Project.libs: LibrariesForLibs get() = the() @@ -11,11 +15,23 @@ internal val Project.libs: LibrariesForLibs get() = the() inline fun ExtensionContainer.findOrCreateExtension(name: String): T = Extensions.findOrCreate(this, name, T::class.java) open class DistributorModuleExtension(project: Project) { - val identifier: Property = project.objects.property(String::class.java) - val display: Property = project.objects.property(String::class.java) - val main: Property = project.objects.property(String::class.java) - val description: Property = project.objects.property(String::class.java) + val identifier = project.objects.property() + val display = project.objects.property() + val main = project.objects.property() + val description = project.objects.property() + val dependencies = project.objects.setProperty() - // TODO Does not handle transitive dependencies, FIX IT - val dependencies: SetProperty = project.objects.setProperty(Project::class.java) + companion object { + const val EXTENSION_NAME = "distributorModule" + } +} + +fun Project.collectAllPluginDependencies(): Set> { + val dependencies = mutableSetOf>() + val extension = extensions.findOrCreateExtension(DistributorModuleExtension.EXTENSION_NAME) + for (dependency in extension.dependencies.get()) { + dependencies += dependency.dependencyProject.tasks.named("shadowJar") + dependencies += dependency.dependencyProject.collectAllPluginDependencies() + } + return dependencies } diff --git a/distributor-command-cloud/build.gradle.kts b/distributor-command-cloud/build.gradle.kts index 5936197e..46ea2e03 100644 --- a/distributor-command-cloud/build.gradle.kts +++ b/distributor-command-cloud/build.gradle.kts @@ -1,24 +1,10 @@ plugins { id("distributor.base-conventions") - id("distributor.mindustry-conventions") id("distributor.publish-conventions") } -repositories { - maven("https://oss.sonatype.org/content/repositories/snapshots/") { - name = "sonatype-oss-snapshots" - mavenContent { snapshotsOnly() } - } -} - -module { - identifier = "distributor-command-cloud" - display = "DistributorLoggerSimple" - main = "com.xpdustry.distributor.logger.simple.DistributorLoggerPlugin" - description = "Simple slf4j logger implementation for plugins." -} - dependencies { + compileOnly(projects.distributorCore) api(libs.cloud.core) - compileOnly(project(":distributor-common")) + compileOnly(libs.bundles.mindustry) } diff --git a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcCommandManager.java b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcCommandManager.java index 9216293d..65a7d59d 100644 --- a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcCommandManager.java +++ b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcCommandManager.java @@ -29,10 +29,10 @@ import com.xpdustry.distributor.command.cloud.parser.content.UnitParser; import com.xpdustry.distributor.command.cloud.parser.content.WeatherParser; import com.xpdustry.distributor.command.cloud.specifier.AllTeams; -import com.xpdustry.distributor.common.DistributorProvider; -import com.xpdustry.distributor.common.command.CommandSender; -import com.xpdustry.distributor.common.plugin.MindustryPlugin; -import com.xpdustry.distributor.common.plugin.PluginAware; +import com.xpdustry.distributor.core.DistributorProvider; +import com.xpdustry.distributor.core.command.CommandSender; +import com.xpdustry.distributor.core.plugin.MindustryPlugin; +import com.xpdustry.distributor.core.plugin.PluginAware; import io.leangen.geantyref.TypeToken; import java.text.MessageFormat; import mindustry.game.Team; diff --git a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcRegistrationHandler.java b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcRegistrationHandler.java index 543fd1d1..796269f2 100644 --- a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcRegistrationHandler.java +++ b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/ArcRegistrationHandler.java @@ -20,7 +20,7 @@ import arc.struct.ObjectMap; import arc.util.CommandHandler; -import com.xpdustry.distributor.common.collection.ArcCollections; +import com.xpdustry.distributor.core.collection.ArcCollections; import java.lang.reflect.Field; import java.util.HashSet; import java.util.Set; diff --git a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/CloudCommandFacade.java b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/CloudCommandFacade.java index 11f08259..bcdf4884 100644 --- a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/CloudCommandFacade.java +++ b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/CloudCommandFacade.java @@ -19,12 +19,12 @@ package com.xpdustry.distributor.command.cloud; import arc.util.CommandHandler; -import com.xpdustry.distributor.common.command.CommandDescription; -import com.xpdustry.distributor.common.command.CommandElement; -import com.xpdustry.distributor.common.command.CommandFacade; -import com.xpdustry.distributor.common.command.CommandHelp; -import com.xpdustry.distributor.common.command.CommandSender; -import com.xpdustry.distributor.common.plugin.MindustryPlugin; +import com.xpdustry.distributor.core.command.CommandDescription; +import com.xpdustry.distributor.core.command.CommandElement; +import com.xpdustry.distributor.core.command.CommandFacade; +import com.xpdustry.distributor.core.command.CommandHelp; +import com.xpdustry.distributor.core.command.CommandSender; +import com.xpdustry.distributor.core.plugin.MindustryPlugin; import java.util.ArrayList; import java.util.List; import mindustry.gen.Player; diff --git a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerLookup.java b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerLookup.java index 77b6b090..00335d21 100644 --- a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerLookup.java +++ b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerLookup.java @@ -19,8 +19,8 @@ package com.xpdustry.distributor.command.cloud.parser; import arc.util.Strings; -import com.xpdustry.distributor.common.collection.ArcCollections; -import com.xpdustry.distributor.common.player.MUUID; +import com.xpdustry.distributor.core.collection.ArcCollections; +import com.xpdustry.distributor.core.player.MUUID; import java.text.Normalizer; import java.util.ArrayList; import java.util.Collection; diff --git a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerParser.java b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerParser.java index 1a976d74..ccb2cfd9 100644 --- a/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerParser.java +++ b/distributor-command-cloud/src/main/java/com/xpdustry/distributor/command/cloud/parser/PlayerParser.java @@ -20,7 +20,7 @@ import arc.Core; import com.xpdustry.distributor.command.cloud.ArcCommandContextKeys; -import com.xpdustry.distributor.common.collection.ArcCollections; +import com.xpdustry.distributor.core.collection.ArcCollections; import java.util.concurrent.CompletableFuture; import mindustry.gen.Groups; import mindustry.gen.Player; @@ -39,7 +39,7 @@ public final class PlayerParser implements ArgumentParser { static SuggestionProvider SUGGESTION_PROVIDER = (ctx, input) -> CompletableFuture.supplyAsync( () -> ArcCollections.immutableList(Groups.player).stream() .map(Player::plainName) - .map(Suggestion::simple) + .map(Suggestion::suggestion) .toList(), Core.app::post); diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/package-info.java b/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/package-info.java deleted file mode 100644 index b16ce1d0..00000000 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -@NullMarked -package com.xpdustry.distributor.common.permission; - -import org.jspecify.annotations.NullMarked; diff --git a/distributor-common/build.gradle.kts b/distributor-core/build.gradle.kts similarity index 67% rename from distributor-common/build.gradle.kts rename to distributor-core/build.gradle.kts index 7ad0ad76..79450b5c 100644 --- a/distributor-common/build.gradle.kts +++ b/distributor-core/build.gradle.kts @@ -4,16 +4,16 @@ plugins { id("distributor.publish-conventions") } -module { +distributorModule { identifier = "distributor-core" display = "DistributorCore" main = "com.xpdustry.distributor.core.DistributorCorePlugin" description = "Core classes of distributor." - dependencies = setOf(project(":distributor-logging-simple")) + dependencies = setOf(projects.distributorLoggingSimple) } dependencies { - compileOnlyApi(libs.immutables) - annotationProcessor(libs.immutables) + compileOnlyApi(libs.immutables.annotations) + annotationProcessor(libs.immutables.processor) compileOnlyApi(libs.slf4j.api) } diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/Distributor.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/Distributor.java similarity index 79% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/Distributor.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/Distributor.java index 9bf0ad35..138007f5 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/Distributor.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/Distributor.java @@ -16,11 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common; +package com.xpdustry.distributor.core; -import com.xpdustry.distributor.common.command.CommandFacade; -import com.xpdustry.distributor.common.permission.PermissionManager; -import com.xpdustry.distributor.common.service.ServiceManager; +import com.xpdustry.distributor.core.command.CommandFacade; +import com.xpdustry.distributor.core.permission.PermissionManager; +import com.xpdustry.distributor.core.service.ServiceManager; public interface Distributor { diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorCorePlugin.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorCorePlugin.java similarity index 85% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorCorePlugin.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorCorePlugin.java index 59c65512..33243065 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorCorePlugin.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorCorePlugin.java @@ -16,13 +16,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common; +package com.xpdustry.distributor.core; -import com.xpdustry.distributor.common.command.CommandFacade; -import com.xpdustry.distributor.common.permission.PermissionManager; -import com.xpdustry.distributor.common.plugin.AbstractMindustryPlugin; -import com.xpdustry.distributor.common.service.ServiceManager; -import com.xpdustry.distributor.common.util.Priority; +import com.xpdustry.distributor.core.command.CommandFacade; +import com.xpdustry.distributor.core.permission.PermissionManager; +import com.xpdustry.distributor.core.plugin.AbstractMindustryPlugin; +import com.xpdustry.distributor.core.service.ServiceManager; +import com.xpdustry.distributor.core.util.Priority; import java.util.Objects; import org.jspecify.annotations.Nullable; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorInitializationException.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorInitializationException.java similarity index 96% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorInitializationException.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorInitializationException.java index df321028..06de7b55 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorInitializationException.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorInitializationException.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common; +package com.xpdustry.distributor.core; /** * This exception is thrown when the distributor fails to initialize. diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorProvider.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorProvider.java similarity index 98% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorProvider.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorProvider.java index b6e15eaa..0f70207d 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/DistributorProvider.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/DistributorProvider.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common; +package com.xpdustry.distributor.core; import org.jspecify.annotations.Nullable; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcCollections.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcCollections.java similarity index 98% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcCollections.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcCollections.java index e194e8dc..c80bd1c5 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcCollections.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcCollections.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.collection; +package com.xpdustry.distributor.core.collection; import arc.struct.ObjectMap; import arc.struct.ObjectSet; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcList.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcList.java similarity index 98% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcList.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcList.java index a5f7fe94..61e93c64 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcList.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcList.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.collection; +package com.xpdustry.distributor.core.collection; import arc.struct.Seq; import java.io.Serial; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcMap.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcMap.java similarity index 99% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcMap.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcMap.java index 78ec4102..48ad55ba 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcMap.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcMap.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.collection; +package com.xpdustry.distributor.core.collection; import arc.struct.ObjectMap; import java.io.Serial; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcSet.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcSet.java similarity index 97% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcSet.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcSet.java index 6223667f..5e7666a1 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/ArcSet.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/ArcSet.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.collection; +package com.xpdustry.distributor.core.collection; import arc.struct.ObjectSet; import java.io.Serial; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/package-info.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/package-info.java similarity index 52% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/collection/package-info.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/collection/package-info.java index 3f472811..39d38c51 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/collection/package-info.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/collection/package-info.java @@ -1,4 +1,4 @@ @NullMarked -package com.xpdustry.distributor.common.collection; +package com.xpdustry.distributor.core.collection; import org.jspecify.annotations.NullMarked; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/ArcCommandFacade.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/ArcCommandFacade.java similarity index 94% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/ArcCommandFacade.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/ArcCommandFacade.java index 688fea78..93bac05c 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/ArcCommandFacade.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/ArcCommandFacade.java @@ -16,10 +16,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.command; import arc.util.CommandHandler; -import com.xpdustry.distributor.common.plugin.MindustryPlugin; +import com.xpdustry.distributor.core.plugin.MindustryPlugin; import java.util.List; import org.jspecify.annotations.Nullable; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandDescription.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandDescription.java similarity index 94% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandDescription.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandDescription.java index 7290da8b..a8ffd72c 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandDescription.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandDescription.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.command; public interface CommandDescription { diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandElement.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandElement.java similarity index 94% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandElement.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandElement.java index d59b8be3..185ff407 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandElement.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandElement.java @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.command; -import com.xpdustry.distributor.common.internal.GeneratedDataClass; +import com.xpdustry.distributor.core.internal.GeneratedDataClass; import java.util.Collection; import org.immutables.value.Value; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandFacade.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandFacade.java similarity index 92% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandFacade.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandFacade.java index cfad982d..9dd70d00 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandFacade.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandFacade.java @@ -16,10 +16,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.command; import arc.util.CommandHandler; -import com.xpdustry.distributor.common.plugin.MindustryPlugin; +import com.xpdustry.distributor.core.plugin.MindustryPlugin; import org.jspecify.annotations.Nullable; public interface CommandFacade { diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandHelp.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandHelp.java similarity index 94% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandHelp.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandHelp.java index e3fb486f..38a0a90e 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandHelp.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandHelp.java @@ -16,9 +16,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.command; -import com.xpdustry.distributor.common.internal.GeneratedDataClass; +import com.xpdustry.distributor.core.internal.GeneratedDataClass; import java.util.List; import org.immutables.value.Value; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandSender.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandSender.java similarity index 97% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandSender.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandSender.java index f205e0bf..142880ac 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/CommandSender.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/CommandSender.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.command; import mindustry.gen.Player; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/SimpleCommandFacadeFactory.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/SimpleCommandFacadeFactory.java similarity index 96% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/SimpleCommandFacadeFactory.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/SimpleCommandFacadeFactory.java index 3ccc8859..7c727320 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/SimpleCommandFacadeFactory.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/SimpleCommandFacadeFactory.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.command; import arc.util.CommandHandler; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/package-info.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/package-info.java similarity index 54% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/package-info.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/command/package-info.java index 476ede65..e9ed8b4f 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/package-info.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/command/package-info.java @@ -1,4 +1,4 @@ @NullMarked -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.command; import org.jspecify.annotations.NullMarked; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/internal/GeneratedDataClass.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/internal/GeneratedDataClass.java similarity index 96% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/internal/GeneratedDataClass.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/internal/GeneratedDataClass.java index a61c1e54..31a84522 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/internal/GeneratedDataClass.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/internal/GeneratedDataClass.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.internal; +package com.xpdustry.distributor.core.internal; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/package-info.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/package-info.java similarity index 58% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/package-info.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/package-info.java index 3735c5e9..549790b7 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/package-info.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/package-info.java @@ -1,4 +1,4 @@ @NullMarked -package com.xpdustry.distributor.common; +package com.xpdustry.distributor.core; import org.jspecify.annotations.NullMarked; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/EmptyPermissionTree.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/EmptyPermissionTree.java similarity index 96% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/permission/EmptyPermissionTree.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/permission/EmptyPermissionTree.java index b13b3109..4eaf0740 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/EmptyPermissionTree.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/EmptyPermissionTree.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.permission; +package com.xpdustry.distributor.core.permission; import java.util.Collections; import java.util.Map; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/ImmutablePermissionTree.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/ImmutablePermissionTree.java similarity index 96% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/permission/ImmutablePermissionTree.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/permission/ImmutablePermissionTree.java index 81e2e081..6f59033d 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/ImmutablePermissionTree.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/ImmutablePermissionTree.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.permission; +package com.xpdustry.distributor.core.permission; import java.util.Map; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/PermissionManager.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/PermissionManager.java similarity index 97% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/permission/PermissionManager.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/permission/PermissionManager.java index f6f0fd8d..c93ee03f 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/PermissionManager.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/PermissionManager.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.permission; +package com.xpdustry.distributor.core.permission; import java.util.regex.Pattern; import mindustry.gen.Player; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/PermissionTree.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/PermissionTree.java similarity index 96% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/permission/PermissionTree.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/permission/PermissionTree.java index a198cb0c..332ada04 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/PermissionTree.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/PermissionTree.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.permission; +package com.xpdustry.distributor.core.permission; import java.util.Map; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/SimplePermissionTree.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/SimplePermissionTree.java similarity index 98% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/permission/SimplePermissionTree.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/permission/SimplePermissionTree.java index 27ad14bd..44fa43bc 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/SimplePermissionTree.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/SimplePermissionTree.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.permission; +package com.xpdustry.distributor.core.permission; import java.util.Collections; import java.util.HashMap; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/TriState.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/TriState.java similarity index 96% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/permission/TriState.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/permission/TriState.java index 9ba83fee..6e0c1de0 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/permission/TriState.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/TriState.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.permission; +package com.xpdustry.distributor.core.permission; import org.jspecify.annotations.Nullable; diff --git a/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/package-info.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/package-info.java new file mode 100644 index 00000000..f7f2d8a3 --- /dev/null +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/permission/package-info.java @@ -0,0 +1,4 @@ +@NullMarked +package com.xpdustry.distributor.core.permission; + +import org.jspecify.annotations.NullMarked; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/player/MUUID.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/player/MUUID.java similarity index 98% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/player/MUUID.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/player/MUUID.java index 588a7cad..3038cf5c 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/player/MUUID.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/player/MUUID.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.player; +package com.xpdustry.distributor.core.player; import java.util.Base64; import java.util.Objects; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/AbstractMindustryPlugin.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/AbstractMindustryPlugin.java similarity index 99% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/AbstractMindustryPlugin.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/AbstractMindustryPlugin.java index 55dfefe9..547ff0d3 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/AbstractMindustryPlugin.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/AbstractMindustryPlugin.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.plugin; import arc.ApplicationListener; import arc.Core; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/MindustryPlugin.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/MindustryPlugin.java similarity index 98% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/MindustryPlugin.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/MindustryPlugin.java index 5eff4e98..f5b86ac7 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/MindustryPlugin.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/MindustryPlugin.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.plugin; import arc.util.CommandHandler; import java.nio.file.Path; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginAnnotationParser.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginAnnotationParser.java similarity index 95% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginAnnotationParser.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginAnnotationParser.java index 9eaac305..3ed9c859 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginAnnotationParser.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginAnnotationParser.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.plugin; public interface PluginAnnotationParser { diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginAware.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginAware.java similarity index 95% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginAware.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginAware.java index e089a23a..752c5078 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginAware.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginAware.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.plugin; /** * Marks an object as belonging to a plugin. diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginDescriptor.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginDescriptor.java similarity index 98% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginDescriptor.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginDescriptor.java index 8a7509e2..ab220f9f 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginDescriptor.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginDescriptor.java @@ -16,10 +16,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.plugin; import arc.util.serialization.Json; -import com.xpdustry.distributor.common.collection.ArcCollections; +import com.xpdustry.distributor.core.collection.ArcCollections; import java.io.IOException; import java.util.List; import java.util.Objects; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginListener.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginListener.java similarity index 97% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginListener.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginListener.java index 030e7d6b..a9c95556 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/PluginListener.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/PluginListener.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.plugin; import arc.util.CommandHandler; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/WrappingMindustryPlugin.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/WrappingMindustryPlugin.java similarity index 97% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/WrappingMindustryPlugin.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/WrappingMindustryPlugin.java index 5e4c4957..79d9398b 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/plugin/WrappingMindustryPlugin.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/WrappingMindustryPlugin.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.plugin; +package com.xpdustry.distributor.core.plugin; import arc.util.CommandHandler; import java.nio.file.Path; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/package-info.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/package-info.java similarity index 53% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/command/package-info.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/package-info.java index f9778cee..e944e0d1 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/command/package-info.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/plugin/package-info.java @@ -1,4 +1,4 @@ @NullMarked -package com.xpdustry.distributor.common.command; +package com.xpdustry.distributor.core.plugin; import org.jspecify.annotations.NullMarked; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/service/ServiceManager.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/service/ServiceManager.java similarity index 88% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/service/ServiceManager.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/service/ServiceManager.java index 4688f13c..3734f9ac 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/service/ServiceManager.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/service/ServiceManager.java @@ -16,11 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.service; +package com.xpdustry.distributor.core.service; -import com.xpdustry.distributor.common.internal.GeneratedDataClass; -import com.xpdustry.distributor.common.plugin.MindustryPlugin; -import com.xpdustry.distributor.common.util.Priority; +import com.xpdustry.distributor.core.internal.GeneratedDataClass; +import com.xpdustry.distributor.core.plugin.MindustryPlugin; +import com.xpdustry.distributor.core.util.Priority; import java.util.List; import java.util.function.Supplier; import org.immutables.value.Value; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/service/SimpleServiceManager.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/service/SimpleServiceManager.java similarity index 93% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/service/SimpleServiceManager.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/service/SimpleServiceManager.java index 0fd94d42..ad77a65f 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/service/SimpleServiceManager.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/service/SimpleServiceManager.java @@ -16,10 +16,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.service; +package com.xpdustry.distributor.core.service; -import com.xpdustry.distributor.common.plugin.MindustryPlugin; -import com.xpdustry.distributor.common.util.Priority; +import com.xpdustry.distributor.core.plugin.MindustryPlugin; +import com.xpdustry.distributor.core.util.Priority; import java.util.Collection; import java.util.Collections; import java.util.Comparator; diff --git a/distributor-common/src/main/java/com/xpdustry/distributor/common/util/Priority.java b/distributor-core/src/main/java/com/xpdustry/distributor/core/util/Priority.java similarity index 94% rename from distributor-common/src/main/java/com/xpdustry/distributor/common/util/Priority.java rename to distributor-core/src/main/java/com/xpdustry/distributor/core/util/Priority.java index d83a853d..ed16e3a7 100644 --- a/distributor-common/src/main/java/com/xpdustry/distributor/common/util/Priority.java +++ b/distributor-core/src/main/java/com/xpdustry/distributor/core/util/Priority.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.xpdustry.distributor.common.util; +package com.xpdustry.distributor.core.util; public enum Priority { HIGHEST, diff --git a/distributor-logging-simple/build.gradle.kts b/distributor-logging-simple/build.gradle.kts index c551ef3f..8e26870d 100644 --- a/distributor-logging-simple/build.gradle.kts +++ b/distributor-logging-simple/build.gradle.kts @@ -3,7 +3,7 @@ plugins { id("distributor.mindustry-conventions") } -module { +distributorModule { identifier = "distributor-logger" display = "DistributorLoggerSimple" main = "com.xpdustry.distributor.logger.simple.DistributorLoggerPlugin" diff --git a/distributor-permission-rank/build.gradle.kts b/distributor-permission-rank/build.gradle.kts index 5254859b..3f09080b 100644 --- a/distributor-permission-rank/build.gradle.kts +++ b/distributor-permission-rank/build.gradle.kts @@ -4,20 +4,19 @@ plugins { id("distributor.publish-conventions") } -module { +distributorModule { identifier = "distributor-permission-rank" display = "DistributorPermissionRank" main = "com.xpdustry.distributor.permission.rank.DistributorPermissionRankPlugin" description = "Simple permission system based on ranks." - dependencies = setOf(project(":distributor-common")) + dependencies = setOf(projects.distributorCore) } dependencies { - compileOnly(project(":distributor-common")) implementation(libs.configurate.core) implementation(libs.configurate.yaml) } -tasks.runMindustryServer { - mods.from(project(":distributor-logging-simple").tasks.shadowJar) -} \ No newline at end of file +tasks.shadowJar { + minimize() +} diff --git a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/DistributorPermissionRankPlugin.java b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/DistributorPermissionRankPlugin.java index 42f98da6..03c998dd 100644 --- a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/DistributorPermissionRankPlugin.java +++ b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/DistributorPermissionRankPlugin.java @@ -18,10 +18,10 @@ */ package com.xpdustry.distributor.permission.rank; -import com.xpdustry.distributor.common.DistributorProvider; -import com.xpdustry.distributor.common.permission.PermissionManager; -import com.xpdustry.distributor.common.plugin.AbstractMindustryPlugin; -import com.xpdustry.distributor.common.util.Priority; +import com.xpdustry.distributor.core.DistributorProvider; +import com.xpdustry.distributor.core.permission.PermissionManager; +import com.xpdustry.distributor.core.plugin.AbstractMindustryPlugin; +import com.xpdustry.distributor.core.util.Priority; public final class DistributorPermissionRankPlugin extends AbstractMindustryPlugin { diff --git a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionManager.java b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionManager.java index 67a0c0df..0bc1e2b3 100644 --- a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionManager.java +++ b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionManager.java @@ -18,8 +18,8 @@ */ package com.xpdustry.distributor.permission.rank; -import com.xpdustry.distributor.common.permission.PermissionManager; -import com.xpdustry.distributor.common.permission.TriState; +import com.xpdustry.distributor.core.permission.PermissionManager; +import com.xpdustry.distributor.core.permission.TriState; import mindustry.gen.Player; final class RankPermissionManager implements PermissionManager { diff --git a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionStorage.java b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionStorage.java index 7a467f22..f39a52a1 100644 --- a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionStorage.java +++ b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/RankPermissionStorage.java @@ -18,7 +18,7 @@ */ package com.xpdustry.distributor.permission.rank; -import com.xpdustry.distributor.common.permission.PermissionTree; +import com.xpdustry.distributor.core.permission.PermissionTree; public interface RankPermissionStorage { diff --git a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/YamlRankPermissionStorage.java b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/YamlRankPermissionStorage.java index 9c8edf8f..2e88ceca 100644 --- a/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/YamlRankPermissionStorage.java +++ b/distributor-permission-rank/src/main/java/com/xpdustry/distributor/permission/rank/YamlRankPermissionStorage.java @@ -19,9 +19,9 @@ package com.xpdustry.distributor.permission.rank; import arc.util.Log; -import com.xpdustry.distributor.common.permission.PermissionTree; -import com.xpdustry.distributor.common.permission.TriState; -import com.xpdustry.distributor.common.plugin.PluginListener; +import com.xpdustry.distributor.core.permission.PermissionTree; +import com.xpdustry.distributor.core.permission.TriState; +import com.xpdustry.distributor.core.plugin.PluginListener; import java.io.IOException; import java.nio.file.Path; import java.util.Collections; diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6e8dbac7..7a4c73f3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ mindustry = "v146" slf4j = "2.0.12" # command -cloud = "2.0.0-beta.3" +cloud = "2.0.0-beta.4" # utilities immutables = "2.10.1" @@ -56,7 +56,8 @@ slf4j-from-jul = { module = "org.slf4j:jul-to-slf4j", version.ref = "slf4j" } cloud-core = { module = "org.incendo:cloud-core", version.ref = "cloud" } # utilities -immutables = { module = "org.immutables:value", version.ref = "immutables" } +immutables-processor = { module = "org.immutables:value-processor", version.ref = "immutables" } +immutables-annotations = { module = "org.immutables:value-annotations", version.ref = "immutables" } geantyref = { module = "io.leangen.geantyref:geantyref", version.ref = "geantyref" } configurate-core = { module = "org.spongepowered:configurate-core", version.ref = "configurate" } configurate-yaml = { module = "org.spongepowered:configurate-yaml", version.ref = "configurate" } diff --git a/settings.gradle.kts b/settings.gradle.kts index d9ce1fee..153aeeff 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,7 +1,9 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + rootProject.name = "distributor-parent" includeBuild("distributor-build-logic") include(":distributor-logging-simple") -include(":distributor-common") +include(":distributor-core") include(":distributor-command-cloud") include(":distributor-permission-rank")