Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apply plugin: 'java'
sourceCompatibility = 1.8
def WurmServerPath ="C:\\Users\\Jason\\Documents\\WU\\WU-Server\\"
def WurmServerDecompiledPath = "C:\\Users\\Jason\\IdeaProjects\\WurmServerDecompiled\\"
def procyon = "C:\\Users\\Jason\\Documents\\Java\\procyon-decompiler-0.5.30.jar"
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/junit/junit
testCompile group: 'junit', name: 'junit', version: '4.12'
// https://mvnrepository.com/artifact/com.intellij/annotations
compile group: 'com.intellij', name: 'annotations', version: '12.0'
}
task cleanServer (type: Jar) {
from zipTree("${WurmServerPath}server.jar")
include "com/wurmonline/server/**"
include "com/wurmonline/website/**"
include "com/wurmonline/javaone/**"
include "SteamJni/**"
destinationDir = file("${WurmServerDecompiledPath}build\\cleaned\\")
baseName = "server"
}
task decompileServer (type: Exec) {
dependsOn cleanServer
commandLine 'java', '-jar', procyon,
"${WurmServerDecompiledPath}build\\cleaned\\server.jar", '-o',
"${WurmServerDecompiledPath}src\\main\\java"
}
task decompileCommon (type: Exec) {
commandLine 'java', '-jar', procyon,
"${WurmServerPath}common.jar", '-o',
"${WurmServerDecompiledPath}src\\main\\java"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.