Open-source multiplayer game server compatible with the RuneScape client https://www.openrs2.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
896 B

package dev.openrs2.decompiler
import org.jetbrains.java.decompiler.main.Fernflower
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences
class Decompiler(private vararg val libraries: Library) {
fun run() {
for (library in libraries) {
DecompilerIo(library.destination).use { io ->
val fernflower = Fernflower(io, io, OPTIONS, Slf4jFernflowerLogger)
for (dependency in library.dependencies) {
fernflower.addLibrary(dependency.toFile())
}
fernflower.addSource(library.source.toFile())
fernflower.decompileContext()
}
}
}
private companion object {
private val OPTIONS = mapOf(
IFernflowerPreferences.INDENT_STRING to "\t",
IFernflowerPreferences.SYNTHETIC_NOT_SET to "1"
)
}
}