Skip to content

Commit

Permalink
Added release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Bytekeeper committed Nov 22, 2014
1 parent dc8b3db commit 76b64a0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
apply plugin: 'application'
apply plugin: 'application';
apply plugin: 'java';
apply plugin: 'eclipse';
apply plugin: 'findbugs';
apply plugin: 'pmd';
apply plugin: 'jacoco';

version = '1.1-SNAPSHOT'

// -SNAPSHOT is added if the release task is not set
version = '1.1'
archivesBaseName = 'STT'

def javaHome = System.properties['java.home']
Expand Down Expand Up @@ -144,3 +146,13 @@ clean {
task wrapper(type: Wrapper) {
gradleVersion = '2.2'
}

task release(dependsOn: 'distZip') << {
println "Built release for $project.version"
}

gradle.taskGraph.whenReady {taskGraph ->
if (!taskGraph.hasTask(release)) {
version += '-SNAPSHOT'
}
}

0 comments on commit 76b64a0

Please sign in to comment.