blob: 868f580066f365a4da102287c6cbe37c3235fb0b [file] [log] [blame]
class Version {
String timestamp
Version(def properties) {
this.timestamp = getTimestamp()
if (System.properties['ci.build'] == 'true') {
timestamp = "${properties.major}.${properties.minor}.${properties.micro}.D-${getDate()}"
} else {
timestamp = "${properties.major}.${properties.minor}.${properties.micro}.${getDate()}"
}
}
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyyMMddHHmmss')
return formattedDate
}
String toString() {
return timestamp
}
}
subprojects {
apply plugin: 'java'
ext {
// OSGi version
major = '4'
minor = '0'
micro = '0'
// test dependencies
junitVersion = '4.7' // (PB CQ3480)
easymockVersion = '2.3' // (PB CQ1887)
}
version = new Version(project.ext.properties)
repositories {
mavenCentral()
ivy {
url "http://build.eclipse.org/rt/virgo/ivy/bundles/release/"
layout "pattern", {
artifact "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
}
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: junitVersion
testCompile group: 'org.easymock', name: 'easymock', version: easymockVersion
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}