Last active
August 29, 2015 14:02
-
-
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
This file contains hidden or 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
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 | |
} | |
} |
This file contains hidden or 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
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