-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
34 lines (29 loc) · 1.23 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
/* The subprojects group of tasks will use this script when building .
* This info will be associated to the release artifacts.
* The artifacts produced are going to be released under /subproject/build
*/
subprojects {
task buildInfo {
def revisionCommand = "git rev-parse --short HEAD"
def revisionResult = revisionCommand.execute()
project.ext.revision = revisionResult.text.trim()
def branchCommand = "git rev-parse --abbrev-ref HEAD"
def branchResult = branchCommand.execute()
project.ext.branch = branchResult.text.trim()
def hostnameCommand = "hostname"
def hostnameResult = hostnameCommand.execute()
project.ext.hostname = hostnameResult.text.trim()
project.ext.builtAt = (int) (new Date().getTime() / 1000)
project.version = "6.2.0"
}
}
/* This delegates the responsability of evaluating a task to the children .
* A task executed in the root project will be resolved by the children if they define that task.
* e.g.
* prepareDeploy is defined by both the children
* Calling prepareDeploy from the root project will call prepareDeploy on each sub project.
*/
evaluationDependsOnChildren();
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}