diff --git a/asm/pom.xml b/asm/pom.xml index aedab531e0..c112d0045d 100644 --- a/asm/pom.xml +++ b/asm/pom.xml @@ -20,7 +20,7 @@ dev.openrs2 - openrs2-util + openrs2-common ${project.version} diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt index a06a99a395..87d7a318b6 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt @@ -3,8 +3,8 @@ package dev.openrs2.asm.classpath import com.google.common.collect.ImmutableList import dev.openrs2.asm.MemberDesc import dev.openrs2.asm.MemberRef -import dev.openrs2.util.collect.DisjointSet -import dev.openrs2.util.collect.ForestDisjointSet +import dev.openrs2.common.collect.DisjointSet +import dev.openrs2.common.collect.ForestDisjointSet import org.objectweb.asm.commons.Remapper import org.objectweb.asm.tree.ClassNode diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt b/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt index 3b25ebce94..41c4e4c566 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt @@ -3,8 +3,8 @@ package dev.openrs2.asm.classpath import com.github.michaelbull.logging.InlineLogger import dev.openrs2.asm.hasCode import dev.openrs2.asm.remap.ClassForNameRemapper -import dev.openrs2.util.io.DeterministicJarOutputStream -import dev.openrs2.util.io.SkipOutputStream +import dev.openrs2.common.io.DeterministicJarOutputStream +import dev.openrs2.common.io.SkipOutputStream import org.apache.harmony.pack200.Pack200 import org.objectweb.asm.ClassReader import org.objectweb.asm.ClassWriter diff --git a/util/pom.xml b/common/pom.xml similarity index 90% rename from util/pom.xml rename to common/pom.xml index 1eb4b735bf..e71af9fbfb 100644 --- a/util/pom.xml +++ b/common/pom.xml @@ -8,11 +8,11 @@ 1.0.0-SNAPSHOT - openrs2-util + openrs2-common jar - OpenRS2 Utilities - Common utility code used by all modules. + OpenRS2 Common + Common code used by all modules. diff --git a/util/src/main/java/dev/openrs2/util/StringUtils.kt b/common/src/main/java/dev/openrs2/common/StringUtils.kt similarity index 88% rename from util/src/main/java/dev/openrs2/util/StringUtils.kt rename to common/src/main/java/dev/openrs2/common/StringUtils.kt index def6082026..77d87971a9 100644 --- a/util/src/main/java/dev/openrs2/util/StringUtils.kt +++ b/common/src/main/java/dev/openrs2/common/StringUtils.kt @@ -1,4 +1,4 @@ -package dev.openrs2.util +package dev.openrs2.common fun CharSequence.indefiniteArticle(): String { require(isNotEmpty()) diff --git a/util/src/main/java/dev/openrs2/util/collect/DisjointSet.kt b/common/src/main/java/dev/openrs2/common/collect/DisjointSet.kt similarity index 88% rename from util/src/main/java/dev/openrs2/util/collect/DisjointSet.kt rename to common/src/main/java/dev/openrs2/common/collect/DisjointSet.kt index 1b90cdb1fb..d57dd0a423 100644 --- a/util/src/main/java/dev/openrs2/util/collect/DisjointSet.kt +++ b/common/src/main/java/dev/openrs2/common/collect/DisjointSet.kt @@ -1,4 +1,4 @@ -package dev.openrs2.util.collect +package dev.openrs2.common.collect interface DisjointSet : Iterable> { interface Partition : Iterable diff --git a/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.kt b/common/src/main/java/dev/openrs2/common/collect/ForestDisjointSet.kt similarity index 98% rename from util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.kt rename to common/src/main/java/dev/openrs2/common/collect/ForestDisjointSet.kt index b5dd912bf6..39db54394e 100644 --- a/util/src/main/java/dev/openrs2/util/collect/ForestDisjointSet.kt +++ b/common/src/main/java/dev/openrs2/common/collect/ForestDisjointSet.kt @@ -1,4 +1,4 @@ -package dev.openrs2.util.collect +package dev.openrs2.common.collect import java.util.* import kotlin.NoSuchElementException diff --git a/util/src/main/java/dev/openrs2/util/io/DeterministicJarOutputStream.kt b/common/src/main/java/dev/openrs2/common/io/DeterministicJarOutputStream.kt similarity index 95% rename from util/src/main/java/dev/openrs2/util/io/DeterministicJarOutputStream.kt rename to common/src/main/java/dev/openrs2/common/io/DeterministicJarOutputStream.kt index ce2e0bc7ab..9a65fc1c64 100644 --- a/util/src/main/java/dev/openrs2/util/io/DeterministicJarOutputStream.kt +++ b/common/src/main/java/dev/openrs2/common/io/DeterministicJarOutputStream.kt @@ -1,4 +1,4 @@ -package dev.openrs2.util.io +package dev.openrs2.common.io import java.io.OutputStream import java.nio.file.attribute.FileTime diff --git a/util/src/main/java/dev/openrs2/util/io/SkipOutputStream.kt b/common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt similarity index 95% rename from util/src/main/java/dev/openrs2/util/io/SkipOutputStream.kt rename to common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt index 30a39c2af7..12b68c6510 100644 --- a/util/src/main/java/dev/openrs2/util/io/SkipOutputStream.kt +++ b/common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt @@ -1,4 +1,4 @@ -package dev.openrs2.util.io +package dev.openrs2.common.io import java.io.FilterOutputStream import java.io.OutputStream diff --git a/util/src/test/java/dev/openrs2/util/StringUtilsTest.kt b/common/src/test/java/dev/openrs2/common/StringUtilsTest.kt similarity index 93% rename from util/src/test/java/dev/openrs2/util/StringUtilsTest.kt rename to common/src/test/java/dev/openrs2/common/StringUtilsTest.kt index c780e20d56..6ce7f86259 100644 --- a/util/src/test/java/dev/openrs2/util/StringUtilsTest.kt +++ b/common/src/test/java/dev/openrs2/common/StringUtilsTest.kt @@ -1,4 +1,4 @@ -package dev.openrs2.util +package dev.openrs2.common import kotlin.test.Test import kotlin.test.assertEquals diff --git a/decompiler/pom.xml b/decompiler/pom.xml index 7a9e7715b5..538b9b6349 100644 --- a/decompiler/pom.xml +++ b/decompiler/pom.xml @@ -20,7 +20,7 @@ dev.openrs2 - openrs2-util + openrs2-common ${project.version} diff --git a/deob/src/main/java/dev/openrs2/deob/ArgRef.kt b/deob/src/main/java/dev/openrs2/deob/ArgRef.kt index 5fb39aa2be..ad77dd1cf2 100644 --- a/deob/src/main/java/dev/openrs2/deob/ArgRef.kt +++ b/deob/src/main/java/dev/openrs2/deob/ArgRef.kt @@ -1,6 +1,6 @@ package dev.openrs2.deob import dev.openrs2.asm.MemberRef -import dev.openrs2.util.collect.DisjointSet +import dev.openrs2.common.collect.DisjointSet data class ArgRef(val method: DisjointSet.Partition, val arg: Int) diff --git a/deob/src/main/java/dev/openrs2/deob/analysis/SourcedIntValue.kt b/deob/src/main/java/dev/openrs2/deob/analysis/SourcedIntValue.kt index 43cd8acda8..e1feddacf8 100644 --- a/deob/src/main/java/dev/openrs2/deob/analysis/SourcedIntValue.kt +++ b/deob/src/main/java/dev/openrs2/deob/analysis/SourcedIntValue.kt @@ -1,6 +1,6 @@ package dev.openrs2.deob.analysis import dev.openrs2.asm.MemberRef -import dev.openrs2.util.collect.DisjointSet +import dev.openrs2.common.collect.DisjointSet data class SourcedIntValue(val source: DisjointSet.Partition, val intValue: IntValue) diff --git a/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.java b/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.java index f7037b72c3..7d17c59992 100644 --- a/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.java +++ b/deob/src/main/java/dev/openrs2/deob/remap/TypedRemapper.java @@ -10,8 +10,8 @@ import dev.openrs2.asm.MemberDesc; import dev.openrs2.asm.MemberRef; import dev.openrs2.asm.classpath.ClassMetadata; import dev.openrs2.asm.classpath.ClassPath; -import dev.openrs2.util.StringUtilsKt; -import dev.openrs2.util.collect.DisjointSet; +import dev.openrs2.common.StringUtilsKt; +import dev.openrs2.common.collect.DisjointSet; import kotlin.text.StringsKt; import org.objectweb.asm.Type; import org.objectweb.asm.commons.Remapper; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java index 06cafec5ad..951f4b7791 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java @@ -19,10 +19,10 @@ import dev.openrs2.asm.StackMetadataKt; import dev.openrs2.asm.classpath.ClassPath; import dev.openrs2.asm.classpath.Library; import dev.openrs2.asm.transform.Transformer; +import dev.openrs2.common.collect.DisjointSet; import dev.openrs2.deob.ArgRef; import dev.openrs2.deob.analysis.IntInterpreter; import dev.openrs2.deob.analysis.SourcedIntValue; -import dev.openrs2.util.collect.DisjointSet; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.tree.AbstractInsnNode; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java index ab8cd2f40d..445c7ec1e9 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java @@ -12,10 +12,10 @@ import dev.openrs2.asm.MethodNodeUtilsKt; import dev.openrs2.asm.classpath.ClassPath; import dev.openrs2.asm.classpath.Library; import dev.openrs2.asm.transform.Transformer; +import dev.openrs2.common.collect.DisjointSet; import dev.openrs2.deob.ArgRef; import dev.openrs2.deob.analysis.ConstSourceInterpreter; import dev.openrs2.deob.remap.TypedRemapper; -import dev.openrs2.util.collect.DisjointSet; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.tree.AbstractInsnNode; diff --git a/pom.xml b/pom.xml index cc85be72eb..c98a11b72c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,12 +23,12 @@ all asm bundler + common decompiler - deob deob-annotations deob-ast + deob game - util