/
build.gradle
131 lines (104 loc) · 3.72 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
buildscript {
ext {
axionReleasePluginVersion = '1.7.0'
gradleGitPropertiesPluginVersion = '1.4.17'
springBootVersion = '1.5.4.RELEASE'
springPropdepsPluginVersion = '0.0.9.RELEASE'
}
repositories {
mavenCentral()
maven { url 'http://repo.spring.io/plugins-release' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("io.spring.gradle:propdeps-plugin:${springPropdepsPluginVersion}")
classpath("gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:${gradleGitPropertiesPluginVersion}")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("pl.allegro.tech.build:axion-release-plugin:${axionReleasePluginVersion}")
}
}
plugins {
// we say here "apply false" so we can selectively apply the plugin later on
// (e.g., in the subprojects block).
id 'io.spring.dependency-management' version '1.0.3.RELEASE' apply false
}
apply plugin: 'pl.allegro.tech.build.axion-release'
ext {
apacheCommonsLang3Version = '3.6'
durianVersion = '3.4.0'
guavaVersion = '19.0'
immutableValuesVersion = '2.5.3'
javaslangVersion = '2.0.6'
lombokVersion = '1.16.12'
springCloudVersion = 'Dalston.SR1'
}
scmVersion {
// documentation at http://axion-release-plugin.readthedocs.org/en/latest/index.html
repository {
type = 'git'
directory = project.rootProject.file('./')
remote = 'origin'
}
localOnly = false // the release plugin may push to the remote repository
ignoreUncommittedChanges = false
checks {
uncommittedChanges = true
aheadOfRemote = true
}
tag {
prefix = 'release'
versionSeparator = '-'
initialVersion = { tag, position -> '0.0.1' }
}
versionIncrementer 'incrementPatch'
versionCreator 'versionWithBranch'
sanitizeVersion = true
nextVersion {
suffix = 'alpha'
separator = '-'
}
}
allprojects {
group = 'com.haufe.spring.cloud'
project.version = scmVersion.version
description = "Haufe Authenticated Spring Cloud Config Server: ${name}"
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "io.spring.dependency-management"
// Spring Boot Configuration Metadata Processor plugins
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
// The gradle-git-properties plugin writes a property file with all git information.
// Spring Boot applications will pick it up automatically and make the info available at
// their "info" endpoint. I don't expect issues if we have this property file as well in the
// Java modules that are not based on Spring Boot (e.g., search and ingest client).
apply plugin: "com.gorylenko.gradle-git-properties"
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// required for the Spring Metadata Configuration Processor
compileJava.dependsOn(processResources)
repositories {
mavenCentral()
}
dependencies {
testCompile("junit:junit")
testCompile("org.hamcrest:hamcrest-core")
testCompile("org.hamcrest:hamcrest-library")
testCompile("org.mockito:mockito-core")
}
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")
}
}
}