gradle: injected-client things

Move injector goal to injected-client(ish)
Keep injected-client classes in the correct package
Remove placeholder class/duplicate vanilla jar
This commit is contained in:
Lucwousin
2019-07-28 13:39:15 +02:00
parent 81e99a2d9b
commit 8bdb204019
11 changed files with 54 additions and 144 deletions

View File

@@ -2,7 +2,6 @@ group = 'net.runelite.rs'
description = 'Injector'
def buildPath = buildDir.toString().replace('\\', '/') // this doesnt work in an ext block for some reason
def deobfuscatedJar = "${rootPath}/runescape-client/build/libs/rs-client-${project.version}.jar"
def vanillaJar = "${buildPath}/vanilla-${rsversion}.jar"
@@ -39,7 +38,7 @@ compileJava.doLast() {
into "$buildDir"
}
def path = sourceSets.main.runtimeClasspath
def loader = new URLClassLoader(path.collect { f -> f.toURL() } as URL[])
def loader = new URLClassLoader(path.collect { f -> f.toURI().toURL() } as URL[])
def inject = loader.loadClass('net.runelite.injector.Injector')
String[] jarPaths = [
deobfuscatedJar.toString(),

View File

@@ -26,9 +26,6 @@ package net.runelite.injector;
import java.io.File;
import java.io.IOException;
import com.google.common.io.Files;
import net.runelite.asm.ClassFile;
import net.runelite.asm.ClassGroup;
import net.runelite.deob.util.JarUtil;
@@ -72,13 +69,7 @@ public class Injector
private void save(File out) throws IOException
{
out.mkdirs();
for (ClassFile cf : vanilla.getClasses())
{
File f = new File(out, cf.getClassName() + ".class");
byte[] data = JarUtil.writeClass(vanilla, cf);
Files.write(data, f);
}
JarUtil.saveJar(vanilla, out);
}

Binary file not shown.