Skip to content

Instantly share code, notes, and snippets.

@smbarbour
Created March 19, 2014 19:55
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 smbarbour/9649918 to your computer and use it in GitHub Desktop.
Save smbarbour/9649918 to your computer and use it in GitHub Desktop.
import org.apache.tools.ant.filters.*
subprojects {
apply plugin: 'java'
group = 'org.mcupdater'
repositories {
mavenCentral()
}
}
class Version {
int major, minor, buildNum
String toString() {
if (buildNum != null) {
"$major.$minor.$buildNum"
} else {
"$major.$minor"
}
}
}
project(':MCU-Yggdrasil') {
version = '1.0'
dependencies {
compile 'com.google.code.gson:gson:2.2.4'
}
}
project(':MCU-DownloadLib') {
version = new Version(major: 1, minor: 2)
sourceCompatibility = 1.6
afterEvaluate {
configure(allProcessResourcesTasks()) {
filter(ReplaceTokens, tokens: [verMajor: project.version.major, verMinor: project.version.minor, verBuild: project.version.buildNum])
}
}
dependencies {
compile 'commons-codec:commons-codec:1.9'
compile 'commons-io:commons-io:2.4'
compile 'org.tukaani:xz:1.4'
}
}
project(':MCU-API') {
version = '3.2.4a'
dependencies {
compile project(':MCU-DownloadLib')
compile project(':MCU-Yggdrasil')
compile 'commons-codec:commons-codec:1.9'
compile 'commons-io:commons-io:2.4'
compile 'com.google.code.gson:gson:2.2.4'
}
}
project(':MCU-Bootstrap') {
version = '1.2'
sourceCompatibility = 1.6
dependencies {
compile project(':MCU-DownloadLib')
compile 'net.sf.jopt-simple:jopt-simple:4.5'
compile 'org.apache.commons:commons-lang3:3.2.1'
}
jar {
archiveName = 'MCU-Bootstrap.jar'
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
manifest {
attributes "Main-Class" : 'org.mcupdater.BootstrapForm'
}
}
}
project(':MCU-FXGUI') {
version = '3.2.4'
dependencies {
compile project(':MCU-API')
compile project(':MCU-DownloadLib')
compile project(':MCU-Yggdrasil')
compile 'org.apache.commons:commons-lang3:3.2.1'
compile 'net.sf.jopt-simple:jopt-simple:4.5'
compile 'commons-io:commons-io:2.4'
compile 'com.google.code.gson:gson:2.2.4'
compile files("${System.properties['java.home']}/lib/jfxrt.jar")
}
jar {
baseName = 'MCUpdater'
}
}
project(':PackBuilder') {
dependencies {
compile project(':MCU-API')
compile 'net.sf.jopt-simple:jopt-simple:4.5'
compile files("${System.properties['java.home']}/lib/jfxrt.jar")
}
}
project(':FastPack') {
version = '1.5'
sourceCompatibility = 1.7
dependencies {
compile project(':MCU-API')
compile project(':MCU-DownloadLib')
compile 'net.sf.jopt-simple:jopt-simple:4.5'
compile 'commons-codec:commons-codec:1.9'
compile 'org.apache.commons:commons-lang3:3.2.1'
compile 'com.google.code.gson:gson:2.2.4'
}
jar {
baseName = 'MCU-FastPack'
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
manifest {
attributes "Main-Class" : 'org.mcupdater.fastpack.FastPack'
}
}
}
def allProcessResourcesTasks() {
apply plugin: 'java'
sourceSets.all.processResourcesTaskName.collect {
tasks[it]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment