Skip to content

Instantly share code, notes, and snippets.

@AbrarSyed
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AbrarSyed/74565dcf9112f8b8f763 to your computer and use it in GitHub Desktop.
Save AbrarSyed/74565dcf9112f8b8f763 to your computer and use it in GitHub Desktop.
Put these in a folder, clone projects to that folder to your hearts content. Then run ```` gradle build``` and all the mods will be built and put in the output folder for you. DISCLAIMER: may not work perfectly for all mods
task build
task clean
task setup
ext.output = new File(rootProject.projectDir, "output")
subprojects {
afterEvaluate {
// not using ForgeGradle? skipping you.
if (!hasPlugin("forge") && !hasPlugin("fml") && !hasPlugin("liteloader"))
return;
rootProject.tasks.build.dependsOn build
rootProject.tasks.clean.dependsOn clean
rootProject.tasks.setup.dependsOn setupDecompWorkspace
// gauranteed to exist
jar.destinationDir = rootProject.output
}
}
import groovy.io.FileType
// dynamic module loader
def exclude = [
"gradle",
"build",
"output",
// any other ignored dirs.
]
rootProject.projectDir.eachFile(FileType.DIRECTORIES) {
if (it.getName().startsWith('.') || exclude.contains(it.getName()))
return
else
include it.getName()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment