Skip to content
Snippets Groups Projects
Commit d991f08c authored by anttil's avatar anttil
Browse files

SSDM-149: Build cisd-base with Gradle

SVN: 31432
parent 8212faa5
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle' apply from: '../gradle/javaproject.gradle'
apply plugin: 'ivy-publish'
group="cisd"
dependencies { dependencies {
compile 'apache:commons-io:+', compile 'apache:commons-io:+',
'apache:commons-lang:+', 'apache:commons-lang:+',
'testng:testng:+', 'testng:testng:+',
'rinn:restrictions:+', 'rinn:restrictions:+'
'cisd:cisd-unix:+',
'cisd:cisd-nativedata:+'
} }
tasks.withType(Test) {
systemProperty "java.library.path", "../libraries/unix/native/unix/amd64-Linux:../libraries/nativedata/native/nativedata/amd64-Linux:../libraries/unix/native/unix/x86_64-Mac OS X:../libraries/nativedata/native/nativedata/x86_64-Mac OS X"
}
group="cisd"
new ByteArrayOutputStream().withStream { os -> new ByteArrayOutputStream().withStream { os ->
def result = exec { def result = exec {
executable = 'svn' executable = 'svn'
...@@ -22,32 +23,79 @@ new ByteArrayOutputStream().withStream { os -> ...@@ -22,32 +23,79 @@ new ByteArrayOutputStream().withStream { os ->
def matchLastChangedRevMatcher = outputAsString =~ /Last Changed Rev: (\d+)/ def matchLastChangedRevMatcher = outputAsString =~ /Last Changed Rev: (\d+)/
def urlMatcher = outputAsString =~ /URL: .*\/(.+)/ def urlMatcher = outputAsString =~ /URL: .*\/(.+)/
def revision = "r${matchLastChangedRevMatcher[0][1]}" def revision = "r${matchLastChangedRevMatcher[0][1]}"
def branch = urlMatcher[0][1] def branch = urlMatcher[0][1]
if (branch.equals('trunk')) { if (branch.equals('trunk')) {
project.version = revision project.version = revision
} else { } else {
project.version = branch project.version = branch
} }
} }
publishing { sourceSets {
publications { test {
ivy(IvyPublication) { resources {
from components.java srcDir "../libraries"
artifact(sourceJar) include "nativedata/**"
} include "unix/**"
} }
repositories { }
ivy { }
ivyPattern "file://${project.projectDir}/../ivy-repository/[organisation]/[module]/[revision]/ivy.xml"
artifactPattern "file://${project.projectDir}/../ivy-repository/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]" jar {
} from fileTree("../libraries/nativedata/")
from fileTree("../libraries/unix/")
}
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)
from files("../libraries/nativedata")
from files("../libraries/unix")
from {configurations.testRuntime.collect {zipTree(it)}}
manifest {
attributes 'Main-Class': 'ch.systemsx.cisd.base.AllTests'
} }
} }
publish { task javadocZip(type: Zip, dependsOn: javadoc) {
dependsOn build archiveName 'cisd-base-javadoc.zip'
from javadoc.destinationDir
} }
task distributionZip(type: Zip, dependsOn: [jar, sourcesJar, javadocZip, standaloneTestJar]) {
archiveBaseName = '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
No preview for this file type
#Fri May 10 09:46:23 CEST 2013 #Wed Apr 23 11:31:33 CEST 2014
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=http\://svncisd.ethz.ch/repos/cisd/ivy-repository/trunk/gradle/distribution/1.5/gradle-1.5-bin.zip distributionUrl=http\://svncisd.ethz.ch/repos/cisd/ivy-repository/trunk/gradle/distribution/1.8/gradle-1.8-all.zip
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment