forked from rundeck/rundeck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
49 lines (41 loc) · 1.67 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* Rundeck Master-Build Project
*
* This project does not contain any buildable code and does not generate any
* artifacts, however it allows us to set defaults for the subjects and provides
* Groovy syntax highlighting for gradle build files (like this one)
**/
description = 'The master-build project for Rundeck';
apply plugin: 'eclipse';
apply plugin: 'idea'
eclipse.project.name = 'rundeck'
/**
* Defaults for all projects
*/
subprojects {
// set the eclipse project naming convention to rundeck:<path>:<projectName>
// so it matches the logical hierarchy more closely
apply plugin: 'eclipse'
eclipse.project.name = "${project.getParent().eclipse.project.name}:${name}"
// the environment can be set by adding -Penvironment={value} as a command
// line switch. by default we run as 'development'
ext.environment = project.hasProperty('environment') ? environment : 'development';
// Unless we're doing a release build, append -SNAPSHOT to the end of the
// artifacts. Otherwise use the currentVersion as defined in gradle.properties and
// the releaseTag if it is not 'GA'
def vtag = environment != 'release' ? '-SNAPSHOT' : (project.hasProperty('releaseTag') && releaseTag!='GA' ? '-'+releaseTag : '')
version = currentVersion + vtag
ext.isReleaseBuild = false
ext.isSnapshotBuild = false
ext.isDevBuild = false
if(project.hasProperty('environment') && project.environment == 'release'){
ext.isReleaseBuild=true
}else if(project.hasProperty("snapshot")){
ext.isSnapshotBuild=true
}else{
ext.isDevBuild=true
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.2'
}