Skip to content

Commit

Permalink
chore: Moved implementation classes in common package
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed May 18, 2024
1 parent 2422df2 commit b8464e4
Show file tree
Hide file tree
Showing 22 changed files with 36 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import com.xpdustry.distributor.api.test.TestPlugin;
import com.xpdustry.distributor.api.test.TestScheduler;
import com.xpdustry.distributor.api.util.Priority;
import com.xpdustry.distributor.event.EventBusImpl;
import com.xpdustry.distributor.scheduler.PluginSchedulerImpl;
import com.xpdustry.distributor.common.event.EventBusImpl;
import com.xpdustry.distributor.common.scheduler.PluginSchedulerImpl;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.xpdustry.distributor.api.scheduler.PluginScheduler;
import com.xpdustry.distributor.api.test.ManageSchedulerExtension;
import com.xpdustry.distributor.api.test.TestScheduler;
import com.xpdustry.distributor.scheduler.PluginSchedulerImpl;
import com.xpdustry.distributor.common.scheduler.PluginSchedulerImpl;
import java.time.Duration;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicInteger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package com.xpdustry.distributor.api.test;

import com.xpdustry.distributor.api.scheduler.PluginScheduler;
import com.xpdustry.distributor.scheduler.PluginSchedulerImpl;
import com.xpdustry.distributor.scheduler.PluginTimeSource;
import com.xpdustry.distributor.common.scheduler.PluginSchedulerImpl;
import com.xpdustry.distributor.common.scheduler.PluginTimeSource;
import java.lang.reflect.Field;
import java.util.Map;
import java.util.Objects;
Expand Down
4 changes: 2 additions & 2 deletions distributor-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
distributorModule {
identifier = "distributor-common"
display = "DistributorCommon"
main = "com.xpdustry.distributor.DistributorCommonPlugin"
main = "com.xpdustry.distributor.common.DistributorCommonPlugin"
description = "Core classes of distributor."
dependencies = listOf("distributor-logging")
}
Expand All @@ -18,7 +18,7 @@ dependencies {
}

tasks.shadowJar {
val relocationPackage = "com.xpdustry.distributor.vanilla.shadow"
val relocationPackage = "com.xpdustry.distributor.common.shadow"
relocate("org.fusesource.jansi", "$relocationPackage.jansi")
minimize {
exclude(dependency(projects.distributorCommonApi))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor;
package com.xpdustry.distributor.common;

import arc.Core;
import com.xpdustry.distributor.api.Distributor;
Expand All @@ -33,15 +33,15 @@
import com.xpdustry.distributor.api.service.ServiceManager;
import com.xpdustry.distributor.api.translation.TranslationSource;
import com.xpdustry.distributor.api.translation.TranslationSourceRegistry;
import com.xpdustry.distributor.audience.AudienceProviderImpl;
import com.xpdustry.distributor.component.codec.AnsiEncoderImpl;
import com.xpdustry.distributor.component.codec.MindustryDecoderImpl;
import com.xpdustry.distributor.component.codec.MindustryEncoderImpl;
import com.xpdustry.distributor.component.codec.PlainTextEncoderImpl;
import com.xpdustry.distributor.event.EventBusImpl;
import com.xpdustry.distributor.scheduler.PluginSchedulerImpl;
import com.xpdustry.distributor.scheduler.PluginTimeSource;
import com.xpdustry.distributor.service.ServiceManagerImpl;
import com.xpdustry.distributor.common.audience.AudienceProviderImpl;
import com.xpdustry.distributor.common.component.codec.AnsiEncoderImpl;
import com.xpdustry.distributor.common.component.codec.MindustryDecoderImpl;
import com.xpdustry.distributor.common.component.codec.MindustryEncoderImpl;
import com.xpdustry.distributor.common.component.codec.PlainTextEncoderImpl;
import com.xpdustry.distributor.common.event.EventBusImpl;
import com.xpdustry.distributor.common.scheduler.PluginSchedulerImpl;
import com.xpdustry.distributor.common.scheduler.PluginTimeSource;
import com.xpdustry.distributor.common.service.ServiceManagerImpl;
import java.util.Objects;
import java.util.function.Function;
import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.audience;
package com.xpdustry.distributor.common.audience;

import com.xpdustry.distributor.api.DistributorProvider;
import com.xpdustry.distributor.api.audience.Audience;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.audience;
package com.xpdustry.distributor.common.audience;

import com.xpdustry.distributor.api.DistributorProvider;
import com.xpdustry.distributor.api.audience.Audience;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.audience;
package com.xpdustry.distributor.common.audience;

import arc.util.Log;
import com.xpdustry.distributor.api.DistributorProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.component.codec;
package com.xpdustry.distributor.common.component.codec;

import com.xpdustry.distributor.api.DistributorProvider;
import com.xpdustry.distributor.api.audience.Audience;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.component.codec;
package com.xpdustry.distributor.common.component.codec;

import arc.util.OS;
import com.xpdustry.distributor.api.component.style.ComponentStyle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.component.codec;
package com.xpdustry.distributor.common.component.codec;

import arc.graphics.Color;
import arc.graphics.Colors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.component.codec;
package com.xpdustry.distributor.common.component.codec;

import com.xpdustry.distributor.api.component.style.ComponentColor;
import com.xpdustry.distributor.api.component.style.ComponentStyle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.component.codec;
package com.xpdustry.distributor.common.component.codec;

import com.xpdustry.distributor.api.component.style.ComponentStyle;
import com.xpdustry.distributor.api.key.Key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.event;
package com.xpdustry.distributor.common.event;

import arc.Events;
import arc.func.Cons;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
TypeUseLocation.UPPER_BOUND,
TypeUseLocation.OTHERWISE,
})
package com.xpdustry.distributor;
package com.xpdustry.distributor.common;

import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.framework.qual.DefaultQualifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.scheduler;
package com.xpdustry.distributor.common.scheduler;

import com.xpdustry.distributor.api.plugin.MindustryPlugin;
import com.xpdustry.distributor.api.plugin.PluginListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.scheduler;
package com.xpdustry.distributor.common.scheduler;

import com.xpdustry.distributor.api.plugin.MindustryPlugin;
import com.xpdustry.distributor.api.scheduler.Cancellable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.scheduler;
package com.xpdustry.distributor.common.scheduler;

import arc.util.Time;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.service;
package com.xpdustry.distributor.common.service;

import com.xpdustry.distributor.api.plugin.MindustryPlugin;
import com.xpdustry.distributor.api.service.ServiceManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.component.codec;
package com.xpdustry.distributor.common.codec;

import com.xpdustry.distributor.api.component.ListComponent;
import com.xpdustry.distributor.api.component.style.ComponentColor;
import com.xpdustry.distributor.api.metadata.MetadataContainer;
import com.xpdustry.distributor.common.component.codec.MindustryDecoderImpl;
import org.junit.jupiter.api.Test;

import static com.xpdustry.distributor.api.component.TextComponent.text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.xpdustry.distributor.component.codec;
package com.xpdustry.distributor.common.codec;

import com.xpdustry.distributor.api.Distributor;
import com.xpdustry.distributor.api.DistributorProvider;
Expand All @@ -28,6 +28,7 @@
import com.xpdustry.distributor.api.translation.Translation;
import com.xpdustry.distributor.api.translation.TranslationArguments;
import com.xpdustry.distributor.api.translation.TranslationSourceRegistry;
import com.xpdustry.distributor.common.component.codec.MindustryEncoderImpl;
import java.util.Locale;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.xpdustry.distributor.api.plugin.MindustryPlugin;
import com.xpdustry.distributor.api.service.ServiceManager;
import com.xpdustry.distributor.api.util.Priority;
import com.xpdustry.distributor.service.ServiceManagerImpl;
import com.xpdustry.distributor.common.service.ServiceManagerImpl;
import java.util.List;
import mindustry.gen.Player;
import org.junit.jupiter.api.AfterEach;
Expand Down

0 comments on commit b8464e4

Please sign in to comment.