Skip to content
Snippets Groups Projects
Commit 0c3c48f7 authored by Rick Herrick's avatar Rick Herrick
Browse files

Fixed issue with build versioning, removed git-versioning plugin and...

Fixed issue with build versioning, removed git-versioning plugin and substituted simple git plugin for revision.
parent d517d343
No related branches found
No related tags found
No related merge requests found
...@@ -18,11 +18,13 @@ def vGroovy = '2.4.6' ...@@ -18,11 +18,13 @@ def vGroovy = '2.4.6'
def vJython = '2.7.0' def vJython = '2.7.0'
group 'org.nrg.xnat' group 'org.nrg.xnat'
version = vXnat
buildscript { buildscript {
repositories { repositories {
mavenLocal() mavenLocal()
jcenter() jcenter()
mavenCentral()
maven { maven {
url "https://plugins.gradle.org/m2/" url "https://plugins.gradle.org/m2/"
} }
...@@ -38,7 +40,7 @@ buildscript { ...@@ -38,7 +40,7 @@ buildscript {
dependencies { dependencies {
classpath "com.bmuschko:gradle-cargo-plugin:2.2.2" classpath "com.bmuschko:gradle-cargo-plugin:2.2.2"
classpath "com.bmuschko:gradle-tomcat-plugin:2.2.4" classpath "com.bmuschko:gradle-tomcat-plugin:2.2.4"
classpath "gradle.plugin.com.zoltu.gradle.plugin:git-versioning:2.0.19" classpath "gradle.plugin.com.palantir.gradle.gitversion:gradle-git-version:0.5.1"
} }
} }
...@@ -49,7 +51,7 @@ apply plugin: 'maven' ...@@ -49,7 +51,7 @@ apply plugin: 'maven'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.bmuschko.tomcat' apply plugin: 'com.bmuschko.tomcat'
apply plugin: 'com.bmuschko.cargo' apply plugin: 'com.bmuschko.cargo'
apply plugin: "com.zoltu.git-versioning" apply plugin: "com.palantir.git-version"
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'eclipse' apply plugin: 'eclipse'
...@@ -140,22 +142,27 @@ if (JavaVersion.current().isJava8Compatible()) { ...@@ -140,22 +142,27 @@ if (JavaVersion.current().isJava8Compatible()) {
} }
// Pulls in the Jenkins BUILD_NUMBER environment variable if available. // Pulls in the Jenkins BUILD_NUMBER environment variable if available.
def buildNumber = hasProperty("BUILD_NUMBER") ? getProperty("BUILD_NUMBER") : "Manual"
def buildDate = new Date() def buildDate = new Date()
def buildNumber = hasProperty("BUILD_NUMBER") ? getProperty("BUILD_NUMBER") : "Manual"
def revision = gitVersion().replace("${version}-", "")
jar { jar {
manifest { manifest {
attributes 'Build-Number': buildNumber, attributes 'Application-Name': 'XNAT',
'Build-Date': buildDate, 'Build-Date': buildDate,
'Application-Name': 'XNAT' 'Build-Number': buildNumber,
'Implementation-Sha': revision,
'Implementation-Version': version
} }
} }
war { war {
manifest { manifest {
attributes 'Build-Number': buildNumber, attributes 'Application-Name': 'XNAT',
'Build-Date': buildDate, 'Build-Date': buildDate,
'Application-Name': 'XNAT' 'Build-Number': buildNumber,
'Implementation-Sha': revision,
'Implementation-Version': version
} }
} }
...@@ -270,7 +277,7 @@ configurations { ...@@ -270,7 +277,7 @@ configurations {
dependencies { dependencies {
// NRG dependencies first. // NRG dependencies first.
compile "org.nrg.xnat:spawner:${vXnat}" compile "org.nrg.xnat:spawner:${vXnat}"
compile("org.nrg.xnat:xnat-data-models:${vXnat}"){ compile("org.nrg.xnat:xnat-data-models:${vXnat}") {
transitive = false transitive = false
} }
compile "org.nrg.xdat:core:${vXnat}" compile "org.nrg.xdat:core:${vXnat}"
...@@ -418,7 +425,7 @@ dependencies { ...@@ -418,7 +425,7 @@ dependencies {
"org.apache.tomcat.embed:tomcat-embed-jasper:${vTomcat}" "org.apache.tomcat.embed:tomcat-embed-jasper:${vTomcat}"
cargo "org.codehaus.cargo:cargo-core-uberjar:${vCargo}", cargo "org.codehaus.cargo:cargo-core-uberjar:${vCargo}",
"org.codehaus.cargo:cargo-ant:${vCargo}" "org.codehaus.cargo:cargo-ant:${vCargo}"
testCompile "junit:junit:${vJunit}" testCompile "junit:junit:${vJunit}"
testCompile "org.springframework:spring-test:${vSpring}" testCompile "org.springframework:spring-test:${vSpring}"
......
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