Skip to content

Instantly share code, notes, and snippets.

@Joedobo27
Created January 22, 2020 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Joedobo27/acf22edc858d2bafd5b14cecfa3d0519 to your computer and use it in GitHub Desktop.
Save Joedobo27/acf22edc858d2bafd5b14cecfa3d0519 to your computer and use it in GitHub Desktop.
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