diff --git a/.travis.yml b/.travis.yml index 32e7b7274..e64f9d236 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,9 @@ jobs: - stage: build script: ./gradlew build - stage: snapshot - script: ./gradlew artifactoryPublish --exclude-task test -Dsnapshot=true -Dbintray.user=${BINTRAY_USER} -Dbintray.key=${BINTRAY_KEY} -Dbuild.number=${TRAVIS_BUILD_NUMBER} + script: ./gradlew artifactoryPublish --exclude-task test -Dbintray.user=${BINTRAY_USER} -Dbintray.key=${BINTRAY_KEY} -Dbuild.number=${TRAVIS_BUILD_NUMBER} - stage: release - script: ./gradlew bintrayUpload --exclude-task test -Dbintray.user=${BINTRAY_USER} -Dbintray.key=${BINTRAY_KEY} -Dbuild.number=${TRAVIS_BUILD_NUMBER} + script: ./gradlew bintrayUpload --exclude-task test -Drelease=true -Dbintray.user=${BINTRAY_USER} -Dbintray.key=${BINTRAY_KEY} -Dbuild.number=${TRAVIS_BUILD_NUMBER} before_deploy: ./gradlew distZip --exclude-task test diff --git a/build.gradle b/build.gradle index 9cf0eea06..acefb1322 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ buildscript { } dependencies { - classpath "de.hhu.bsinfo:dxbuild:0.2.0" + (Boolean.valueOf(System.getProperty('snapshot')) ? '-SNAPSHOT' : '') + classpath "de.hhu.bsinfo:dxbuild:0.2.0" + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT') } } @@ -28,7 +28,7 @@ plugins { apply plugin: 'dxbuild' group = 'de.hhu.bsinfo' -version = '0.5.0' + (Boolean.valueOf(System.getProperty("snapshot")) ? "-SNAPSHOT" : "") +version = '0.5.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT') sourceCompatibility = '1.8' targetCompatibility = '1.8' @@ -85,11 +85,11 @@ dependencies { compileOnly 'org.projectlombok:lombok:1.18.2' api 'commons-cli:commons-cli:1.4' - api 'de.hhu.bsinfo:dxmem:0.5.0' + (Boolean.valueOf(System.getProperty('snapshot')) ? '-SNAPSHOT' : '') - api 'de.hhu.bsinfo:dxnet:0.5.0' + (Boolean.valueOf(System.getProperty('snapshot')) ? '-SNAPSHOT' : '') - api 'de.hhu.bsinfo:dxlog:0.5.0' + (Boolean.valueOf(System.getProperty('snapshot')) ? '-SNAPSHOT' : '') - api 'de.hhu.bsinfo:dxmon:0.2.0' + (Boolean.valueOf(System.getProperty('snapshot')) ? '-SNAPSHOT' : '') - nativeApi 'de.hhu.bsinfo:dxutils:0.5.0' + (Boolean.valueOf(System.getProperty('snapshot')) ? '-SNAPSHOT' : '') + api 'de.hhu.bsinfo:dxmem:0.5.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT') + api 'de.hhu.bsinfo:dxnet:0.5.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT') + api 'de.hhu.bsinfo:dxlog:0.5.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT') + api 'de.hhu.bsinfo:dxmon:0.2.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT') + nativeApi 'de.hhu.bsinfo:dxutils:0.5.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT') implementation 'com.google.guava:guava:26.0-jre' implementation 'org.apache.zookeeper:zookeeper:3.4.13'