forked from VeriBlock/nodecore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
52 lines (45 loc) · 1.15 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:nebula-release-plugin:6.0.0'
classpath 'org.ajoberstar:grgit:1.1.0'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.3"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
}
}
plugins {
id 'nebula.release' version '6.0.0'
id 'com.jfrog.artifactory' version '4.7.3'
}
allprojects {
repositories {
mavenLocal()
jcenter()
}
}
subprojects {
version = version
}
nebulaRelease {
addReleaseBranchPattern(/(release(-|\/))?\d+(.\d+)?(.\d+)?/)
}
releaseCheck.doLast {
// Print version to configure TeamCity
println "##teamcity[buildNumber \'${prettyVersion()}\']"
}
String prettyVersion() {
String version = rootProject.version.toString()
if (version.contains("+")) {
if (version.contains("+develop")) {
version = version.split("\\+")[0]
} else {
version = version.substring(0, version.lastIndexOf(".")).replace("+", ".")
}
}
return version
}
task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
}