-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.gradle
42 lines (33 loc) · 1.3 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
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.30"
}
ext {
def correctVersion = project.hasProperty('versionNumber') && property('versionNumber') ==~ /\d+\.\d+\.\d+.*/
versionNumber = correctVersion ? property('versionNumber') : 'SNAPSHOT-' + new Date().format('yyyyMMddHHmmss')
projectIds = ['group': 'teamcity-google-agent', 'version': versionNumber]
teamcityVersion = project.findProperty('teamcityVersion') ?: '2017.1'
teamcityDir = project.findProperty('teamcityDir') ?: "$rootDir/servers/TeamCity-${teamcityVersion}"
if (teamcityDir == null || !file(teamcityDir).isDirectory()) {
throw new InvalidUserDataException('Please, execute gradle task `:teamcity-symbol-server:installTeamCity` ' +
'or specify correct `teamcityDir` path in gradle.properties file')
}
teamcityDir = teamcityDir.replace("\\", "/")
if (teamcityDir.endsWith("/")) {
teamcityDir = teamcityDir.substring(0, teamcityDir.length() - 5)
}
println "TeamCity directory: " + teamcityDir
}
group = projectIds.group
version = projectIds.version
allprojects {
group = projectIds.group
version = projectIds.version
}
subprojects {
apply plugin: "kotlin"
test.useTestNG()
jar.version = null
}
task wrapper(type: Wrapper) {
gradleVersion = '4.9'
}