forked from spekframework/spek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
97 lines (84 loc) · 2.6 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
buildscript {
repositories {
mavenCentral()
maven {
url 'https://dl.bintray.com/kotlin/kotlin-eap'
}
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
jcenter()
}
dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.9.13'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.1.0'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
classpath 'org.ajoberstar:gradle-git:1.5.1'
}
}
plugins {
id "com.zoltu.git-versioning" version "3.0.2"
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
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
}
}
allprojects {
group = 'org.jetbrains.spek'
repositories {
mavenCentral()
mavenCentral()
jcenter()
maven {
url 'http://repository.jetbrains.com/all'
}
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
}
apply plugin: 'idea'
}
task wrapper(type: Wrapper) {
gradleVersion = 3.1
}
if (hasProperty('bintray_user')) {
ext.bintrayUser = getProperty('bintray_user')
} else {
ext.bintrayUser = ''
}
if (hasProperty('bintray_api_key')) {
ext.bintrayApiKey = getProperty('bintray_api_key')
} else {
ext.bintrayApiKey = ''
}