Created
January 22, 2020 14:44
-
-
Save Joedobo27/acf22edc858d2bafd5b14cecfa3d0519 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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