forked from sixhours-team/memcached-spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
87 lines (77 loc) · 2.78 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
buildscript {
ext {
depedencyManagementVersion = '1.0.4.RELEASE'
propdepsVersion = '0.0.9.RELEASE'
gradleBintrayVersion = '1.7.3'
sonarqubeGradleVersion = '2.6.1'
}
repositories {
maven { url 'https://repo.spring.io/plugins-release' }
}
dependencies {
classpath("io.spring.gradle:dependency-management-plugin:$depedencyManagementVersion")
classpath("io.spring.gradle:propdeps-plugin:${propdepsVersion}")
classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:${gradleBintrayVersion}")
classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${sonarqubeGradleVersion}")
}
}
ext.JAVA_GRADLE = "$rootDir/gradle/java.gradle"
ext.RELEASE_GRADLE = "$rootDir/gradle/release.gradle"
ext.SONAR_GRADLE = "$rootDir/gradle/sonar.gradle"
allprojects {
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' : '1.0.0-SNAPSHOT'
}
group = "io.sixhours"
version = gitVersion()
}
subprojects {
apply from: JAVA_GRADLE
apply from: RELEASE_GRADLE
apply plugin: 'propdeps'
apply plugin: 'propdeps-eclipse'
apply plugin: 'io.spring.dependency-management'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
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 {
jcenter()
}
ext {
springBootVersion = '1.5.10.RELEASE'
springCloudVersion = 'Edgware.SR2'
elasticacheClientVersion = '1.1.1'
commonsLoggingVersion = '1.2'
testcontainersVersion = '1.6.0'
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
dependencies {
dependency "com.amazonaws:elasticache-java-cluster-client:$elasticacheClientVersion"
dependency "commons-logging:commons-logging:$commonsLoggingVersion"
dependency "org.testcontainers:testcontainers:$testcontainersVersion"
}
}
}