Replace Guava ImmutableList with Kotlin List in ClassPath

bzip2
Graham 5 years ago
parent 86fe02f32d
commit 15e9636b79
  1. 3
      asm/src/main/java/dev/openrs2/asm/classpath/ClassPath.kt
  2. 13
      deob/src/main/java/dev/openrs2/deob/Deobfuscator.kt

@ -1,6 +1,5 @@
package dev.openrs2.asm.classpath package dev.openrs2.asm.classpath
import com.google.common.collect.ImmutableList
import dev.openrs2.asm.MemberDesc import dev.openrs2.asm.MemberDesc
import dev.openrs2.asm.MemberRef import dev.openrs2.asm.MemberRef
import dev.openrs2.common.collect.DisjointSet import dev.openrs2.common.collect.DisjointSet
@ -10,7 +9,7 @@ import org.objectweb.asm.tree.ClassNode
class ClassPath( class ClassPath(
private val runtime: ClassLoader, private val runtime: ClassLoader,
private val dependencies: ImmutableList<Library>, private val dependencies: List<Library>,
val libraries: List<Library> val libraries: List<Library>
) { ) {
private val cache = mutableMapOf<String, ClassMetadata>() private val cache = mutableMapOf<String, ClassMetadata>()

@ -1,7 +1,6 @@
package dev.openrs2.deob package dev.openrs2.deob
import com.github.michaelbull.logging.InlineLogger import com.github.michaelbull.logging.InlineLogger
import com.google.common.collect.ImmutableList
import dev.openrs2.asm.classpath.ClassPath import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library import dev.openrs2.asm.classpath.Library
import dev.openrs2.asm.classpath.Library.Companion.readJar import dev.openrs2.asm.classpath.Library.Companion.readJar
@ -68,18 +67,18 @@ class Deobfuscator(private val input: Path, private val output: Path) {
val runtime = ClassLoader.getPlatformClassLoader() val runtime = ClassLoader.getPlatformClassLoader()
val classPath = ClassPath( val classPath = ClassPath(
runtime, runtime,
ImmutableList.of(), listOf(),
ImmutableList.of(client, loader, signLink, unpack, unpacker) listOf(client, loader, signLink, unpack, unpacker)
) )
val glClassPath = ClassPath( val glClassPath = ClassPath(
runtime, runtime,
ImmutableList.of(gl, glDri), listOf(gl, glDri),
ImmutableList.of(glClient, glLoader, glSignLink, glUnpack, glUnpacker) listOf(glClient, glLoader, glSignLink, glUnpack, glUnpacker)
) )
val unsignedClassPath = ClassPath( val unsignedClassPath = ClassPath(
runtime, runtime,
ImmutableList.of(), listOf(),
ImmutableList.of(unsignedClient) listOf(unsignedClient)
) )
// deobfuscate // deobfuscate

Loading…
Cancel
Save