Newer
Older
compile 'apache:commons-io:+',
'apache:commons-lang:+',
'testng:testng:+',
'rinn:restrictions:+'
brinn
committed
systemProperty "java.library.path", "libs/native/unix/amd64-Linux:libs/native/nativedata/amd64-Linux:libs/native/unix/x86_64-Mac OS X:libs/native/nativedata/x86_64-Mac OS X"
new ByteArrayOutputStream().withStream { os ->
def result = exec {
executable = 'svn'
args = ['info']
standardOutput = os
}
def outputAsString = os.toString()
def matchLastChangedRevMatcher = outputAsString =~ /Last Changed Rev: (\d+)/
def urlMatcher = outputAsString =~ /URL: .*\/(.+)/
def revision = "r${matchLastChangedRevMatcher[0][1]}"
def branch = urlMatcher[0][1]
if (branch.equals('trunk')) {
project.version = revision
} else {
project.version = branch
}
brinn
committed
srcDir "libs"
include "**"
brinn
committed
from fileTree("libs/")
}
task standaloneTestJar(type: Jar, dependsOn: [classes, testClasses]) {
archiveName 'cisd-base-test.jar'
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
from files(sourceSets.test.output.classesDir)
brinn
committed
from files("libs")
from {configurations.testRuntime.collect {zipTree(it)}}
manifest {
attributes 'Main-Class': 'ch.systemsx.cisd.base.AllTests'
task javadocZip(type: Zip, dependsOn: javadoc) {
archiveName 'cisd-base-javadoc.zip'
from javadoc.destinationDir
task distributionZip(type: Zip, dependsOn: [jar, sourcesJar, javadocZip, standaloneTestJar]) {
baseName = 'cisd-base'
from ('dist') {
into 'cisd-base'
}
from ('doc') {
into 'cisd-base/doc'
}
from (jar.archivePath) {
into 'cisd-base/lib'
rename '(.*)', 'cisd-base.jar'
}
from (sourcesJar.archivePath) {
into 'cisd-base/src'
rename '(.*)', 'cisd-base-src.jar'
}
from (standaloneTestJar.archivePath) {
into 'cisd-base/lib'
}
from (javadocZip.archivePath) {
into 'cisd-base/doc'
}
}
build.dependsOn distributionZip