-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
97 lines (84 loc) · 2.59 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M3'
}
}
plugins {
id "com.zoltu.git-versioning" version "3.0.2"
id "io.spring.dependency-management" version "1.0.0.RC2"
}
ZoltuGitVersioning {
customDescribeProcessor { describeResults ->
def matcher = (describeResults =~ /v(?<major>[0-9]+?)\.(?<minor>[0-9]+?)\.(?<patch>[0-9]+?)(?:\-(?<tags>[0-9A-Za-z\.\-]+))?\-(?<commitCount>[0-9]+?)\-g(?<sha>[a-zA-Z0-9]+)/)
matcher.matches()
[
major: matcher.group('major'),
minor: matcher.group('minor'),
commitCount: matcher.group('commitCount'),
sha: matcher.group('sha'),
tags: matcher.group('tags'),
patch: matcher.group('patch')
]
}
customVersionToString { versionInfo ->
if (versionInfo.tags != null) {
"${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}-${versionInfo.tags}"
} else {
"${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}"
}
}
}
afterEvaluate {
println "##teamcity[buildNumber \'${version}\']"
def v = version
allprojects {
version = v
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'org.junit.platform.gradle.plugin'
repositories {
mavenCentral()
maven {
url "https://dl.bintray.com/jetbrains/spek"
}
}
dependencyManagement {
dependencies {
dependencySet(group: 'org.springframework', version: '4.3.5.RELEASE') {
entry 'spring-core'
entry 'spring-context'
entry 'spring-test'
}
dependencySet(group: 'org.jetbrains.spek', version: '1.1.0-beta3') {
entry 'spek-api'
entry 'spek-junit-platform-engine'
}
dependencySet(group: 'org.jetbrains.kotlin', version: kotlinVersion) {
entry 'kotlin-stdlib'
entry 'kotlin-reflect'
}
}
}
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib'
compile 'org.jetbrains.kotlin:kotlin-reflect'
compile 'org.jetbrains.spek:spek-api'
compile 'org.springframework:spring-context'
compile 'org.springframework:spring-test'
testRuntime 'org.jetbrains.spek:spek-junit-platform-engine'
}
junitPlatform {
platformVersion '1.0.0-M3'
filters {
engines {
include 'spek'
}
}
}