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

@ -1,7 +1,6 @@
package dev.openrs2.deob
import com.github.michaelbull.logging.InlineLogger
import com.google.common.collect.ImmutableList
import dev.openrs2.asm.classpath.ClassPath
import dev.openrs2.asm.classpath.Library
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 classPath = ClassPath(
runtime,
ImmutableList.of(),
ImmutableList.of(client, loader, signLink, unpack, unpacker)
listOf(),
listOf(client, loader, signLink, unpack, unpacker)
)
val glClassPath = ClassPath(
runtime,
ImmutableList.of(gl, glDri),
ImmutableList.of(glClient, glLoader, glSignLink, glUnpack, glUnpacker)
listOf(gl, glDri),
listOf(glClient, glLoader, glSignLink, glUnpack, glUnpacker)
)
val unsignedClassPath = ClassPath(
runtime,
ImmutableList.of(),
ImmutableList.of(unsignedClient)
listOf(),
listOf(unsignedClient)
)
// deobfuscate

Loading…
Cancel
Save