-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathbuild.gradle
73 lines (62 loc) · 2.14 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
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' version '2.3.0.RELEASE' apply false
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
id 'com.github.hierynomus.license' version '0.16.1'
id 'org.sonarqube' version '6.0.1.5171'
id 'com.github.ben-manes.versions' version '0.46.0'
}
ext {
appengineApiVersion = '2.0.12'
awaitilityVersion = '4.2.0'
commonsLoggingVersion = '1.2'
elasticacheClientVersion = '1.2.0'
springCloudVersion = 'Hoxton.SR4'
testcontainersVersion = '1.17.6'
xmemcachedVersion = '2.4.7'
}
ext.JAVA_GRADLE = "$rootDir/gradle/java.gradle"
ext.LICENSE_GRADLE = "$rootDir/gradle/license.gradle"
ext.PUBLISH_GRADLE = "$rootDir/gradle/publish.gradle"
ext.RELEASE_GRADLE = "$rootDir/gradle/release.gradle"
ext.SONAR_GRADLE = "$rootDir/gradle/sonar.gradle"
def gitVersion = { ->
def stdout = new ByteArrayOutputStream()
exec {
ignoreExitValue true
commandLine 'git', 'describe', '--tags', '--abbrev=0', '--match', 'v[[:digit:]]*\\.[[:digit:]]*\\.[[:digit:]]*'
standardOutput = stdout
}
def version = stdout.toString().trim()
return !version.isEmpty() ? version - 'v' : projectVersion
}
def resolvedVersion = project.findProperty('release') ? gitVersion() : '2.5.1-SNAPSHOT'
allprojects {
group = "io.sixhours"
version = resolvedVersion
}
apply from: RELEASE_GRADLE
subprojects {
apply from: JAVA_GRADLE
apply from: SONAR_GRADLE
apply from: LICENSE_GRADLE
apply from: PUBLISH_GRADLE
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
jar {
manifest {
attributes('Implementation-Title': project.name)
attributes('Implementation-Version': project.version)
attributes('Build-Time-ISO-8601': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"))
}
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom SpringBootPlugin.BOM_COORDINATES
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
}