From e05653cdcc7425b69501b8f63670e9dbc346a053 Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 25 Dec 2019 11:39:06 +0000 Subject: [PATCH] Rename util to common --- asm/pom.xml | 2 +- asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt | 4 ++-- asm/src/main/java/dev/openrs2/asm/classpath/Library.kt | 4 ++-- {util => common}/pom.xml | 6 +++--- .../src/main/java/dev/openrs2/common}/StringUtils.kt | 2 +- .../main/java/dev/openrs2/common}/collect/DisjointSet.kt | 2 +- .../java/dev/openrs2/common}/collect/ForestDisjointSet.kt | 2 +- .../dev/openrs2/common}/io/DeterministicJarOutputStream.kt | 2 +- .../main/java/dev/openrs2/common}/io/SkipOutputStream.kt | 2 +- .../src/test/java/dev/openrs2/common}/StringUtilsTest.kt | 2 +- decompiler/pom.xml | 2 +- deob/src/main/java/dev/openrs2/deob/ArgRef.kt | 2 +- .../main/java/dev/openrs2/deob/analysis/SourcedIntValue.kt | 2 +- .../src/main/java/dev/openrs2/deob/remap/TypedRemapper.java | 4 ++-- .../dev/openrs2/deob/transform/DummyArgTransformer.java | 2 +- .../dev/openrs2/deob/transform/UnusedArgTransformer.java | 2 +- pom.xml | 4 ++-- 17 files changed, 23 insertions(+), 23 deletions(-) rename {util => common}/pom.xml (90%) rename {util/src/main/java/dev/openrs2/util => common/src/main/java/dev/openrs2/common}/StringUtils.kt (88%) rename {util/src/main/java/dev/openrs2/util => common/src/main/java/dev/openrs2/common}/collect/DisjointSet.kt (88%) rename {util/src/main/java/dev/openrs2/util => common/src/main/java/dev/openrs2/common}/collect/ForestDisjointSet.kt (98%) rename {util/src/main/java/dev/openrs2/util => common/src/main/java/dev/openrs2/common}/io/DeterministicJarOutputStream.kt (95%) rename {util/src/main/java/dev/openrs2/util => common/src/main/java/dev/openrs2/common}/io/SkipOutputStream.kt (95%) rename {util/src/test/java/dev/openrs2/util => common/src/test/java/dev/openrs2/common}/StringUtilsTest.kt (93%) diff --git a/asm/pom.xml b/asm/pom.xml index aedab531..c112d004 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 a06a99a3..87d7a318 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 3b25ebce..41c4e4c5 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 1eb4b735..e71af9fb 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 def60820..77d87971 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 1b90cdb1..d57dd0a4 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 b5dd912b..39db5439 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 ce2e0bc7..9a65fc1c 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 30a39c2a..12b68c65 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 c780e20d..6ce7f862 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 7a9e7715..538b9b63 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 5fb39aa2..ad77dd1c 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 43cd8acd..e1feddac 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 f7037b72..7d17c599 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 06cafec5..951f4b77 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 ab8cd2f4..445c7ec1 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 cc85be72..c98a11b7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,12 +23,12 @@ all asm bundler + common decompiler - deob deob-annotations deob-ast + deob game - util