-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
60 lines (50 loc) · 1.27 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
buildscript {
ext {
springBootVersion = '1.0.0.RELEASE'
springVersion = '4.0.3.RELEASE'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'maven-publish'
repositories {
mavenLocal()
mavenCentral()
}
group = 'com.loia.api'
baseVersion = '1.0'
version = getVersion(baseVersion)
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}") {
exclude module: 'spring-boot-starter-tomcat'
}
compile "org.springframework.boot:spring-boot-starter-jetty:${springBootVersion}"
testCompile group: 'junit', name: 'junit', version:'4.11'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
def getVersion(baseVersion) {
def buildCounter = System.getenv("GO_PIPELINE_COUNTER")
if (buildCounter == null) {
version = baseVersion
} else {
version = baseVersion + '-' + buildCounter
}
println 'Version: ' + version
return version
}