-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.package.gradle
59 lines (44 loc) · 1.65 KB
/
build.package.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
50
51
52
53
54
55
56
57
58
59
import org.apache.tools.ant.filters.*;
task dist(dependsOn: [ ':meta-runner-common:build',
':meta-runner-server:build',
':meta-runner-agent:build' ]) {
description = 'Create meta-Runner plugin package for TeamCity'
doLast {
gradleDir = new File(distsDir, 'meta-runner')
gradleServer = new File(gradleDir, 'server')
gradleAgentLib = new File(gradleDir, 'agent-lib')
gradleMeta = new File(gradleDir, 'meta-runners')
[gradleDir, gradleServer, gradleAgentLib, gradleMeta].each{ it.mkdirs() }
copy {
from project(':meta-runner-common').libsDir
from project(':meta-runner-agent').libsDir
from (project.configurations.compile.resolve()) { include 'scala*.jar' }
into gradleAgentLib
}
copy {
from('meta-runner-server/meta-runners')
into gradleMeta
}
copy {
from project(':meta-runner-common').libsDir
from project(':meta-runner-server').libsDir
from (project.configurations.compile.resolve()) { include 'scala*.jar' }
into gradleServer
}
version = System.getProperties()['build.number'];
if (version == null) version = 'snapshot-' + new Date().format('yyyyMMdd'+"'z'"+'hhmmss');
copy {
into gradleDir
from (projectDir) {
include 'teamcity-plugin.xml'
filter(ReplaceTokens, tokens:[VERSION: version ])
}
}
task zipPlugin(type: Zip) {
from gradleDir
archiveName='teamcity-meta-runner.zip'
}
zipPlugin.execute()
println "##teamcity[publishArtifacts '${zipPlugin.archivePath}']"
}
}