45 lines
1.6 KiB
Groovy
45 lines
1.6 KiB
Groovy
group = 'net.runelite.rs'
|
|
description = 'Injector'
|
|
|
|
def osrsRevision = 181
|
|
def deobfuscatedJar = "${project.rootDir}/runescape-client/build/libs/rs-client-"+project.version+".jar"
|
|
def vanillaJar = "$buildDir/vanilla-"+osrsRevision+".jar"
|
|
def injectedJar = "${project.rootDir}/injected-client/build/libs/injected-client-"+project.version+".jar"
|
|
|
|
configurations {
|
|
vanilla
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':deobfuscator')
|
|
compile project(':mixins')
|
|
compile project(':runelite-api')
|
|
compile project(':runescape-api')
|
|
compile project(':rs-client')
|
|
compile project(':injected-client')
|
|
compile group: 'org.apache.maven', name: 'maven-plugin-api', version: '3.6.1'
|
|
testCompile project(':deobfuscator')
|
|
testCompile group: 'junit', name: 'junit', version: '4.12'
|
|
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
|
compileOnly group: 'org.apache.maven.plugin-tools', name: 'maven-plugin-annotations', version: '3.6.0'
|
|
annotationProcessor group: 'org.eclipse.sisu', name: 'org.eclipse.sisu.inject', version: '0.3.3'
|
|
vanilla "net.runelite.rs:vanilla:"+osrsRevision
|
|
}
|
|
|
|
compileJava.outputs.upToDateWhen {false}
|
|
|
|
compileJava.doLast() {
|
|
copy {
|
|
from configurations.vanilla
|
|
into "$buildDir"
|
|
}
|
|
def path = sourceSets.main.runtimeClasspath
|
|
def loader = new URLClassLoader(path.collect { f -> f.toURL() } as URL[])
|
|
def inject = loader.loadClass('net.runelite.injector.Injector')
|
|
String[] jarPaths = [
|
|
deobfuscatedJar,
|
|
vanillaJar,
|
|
injectedJar
|
|
]
|
|
inject.main(jarPaths)
|
|
} |