-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
134 lines (111 loc) · 4.13 KB
/
Copy pathbuild.gradle
File metadata and controls
134 lines (111 loc) · 4.13 KB
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
130
131
132
buildscript {
ext {
spring_boot_version = '2.0.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}")
}
}
apply plugin: "maven"
apply plugin: "eclipse"
apply plugin: 'java-library'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = java_version_compatibility
targetCompatibility = java_version_compatibility
group = artifact_group_id
version = artifact_version
archivesBaseName = artifact_base_name
def artifactClassifier = project.hasProperty('classifier') ? classifier : "dev"
// Repositories to work with
repositories {
// Local Maven Repo
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
}
configurations {
compile.exclude module: 'spring-boot-starter-logging'
compile.exclude module: 'spring-boot-starter-tomcat'
compile.exclude module: 'spring-boot-starter-jetty'
compile.exclude module: 'spring-security-web'
compile.exclude module: 'spring-security-test'
compile.exclude group: 'junit'
compile.exclude group: 'org.apache.tomcat'
compile.exclude module: 'spring-asm'
compile.exclude group: 'asm'
compile.exclude module: 'slf4j-log4j12'
compile.exclude group: 'log4j'
compile.exclude group: 'ch.qos.cal10n'
compile.exclude group: 'ch.qos.logback'
compile.exclude group: 'org.springframework.data'
}
ext {
commons_codec_version = "1.11"
commons_collections4_version = "4.1"
commons_lang3_version = "3.7"
guava_version = "25.1-jre"
// Logging related
slf4j_version = "1.8.0-beta1"
log4j2_version = "2.10.0"
lmax_disruptor_version = "3.3.7"
// For unit testing
testng_version = "6.14.2"
spring_cloud_release_train_version = "Finchley.RELEASE"
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${spring_cloud_release_train_version}"
}
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-aop"
compile "org.springframework.boot:spring-boot-starter-cache"
compile "org.springframework.boot:spring-boot-starter-webflux"
compile "org.springframework.boot:spring-boot-starter-hateoas"
compile "org.springframework.boot:spring-boot-starter-log4j2"
compile "org.springframework.cloud:spring-cloud-starter-sleuth"
compile "org.springframework.cloud:spring-cloud-starter-zipkin"
compile "com.google.guava:guava:${guava_version}"
compile "commons-codec:commons-codec:${commons_codec_version}"
compile "org.apache.commons:commons-lang3:${commons_lang3_version}"
compile "org.apache.commons:commons-collections4:${commons_collections4_version}"
// Logging related
compile "org.slf4j:slf4j-api:${slf4j_version}"
compile "org.slf4j:slf4j-ext:${slf4j_version}"
compile "org.slf4j:jcl-over-slf4j:${slf4j_version}"
compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j2_version}"
compile "org.apache.logging.log4j:log4j-api:${log4j2_version}"
compile "org.apache.logging.log4j:log4j-core:${log4j2_version}"
compile "org.apache.logging.log4j:log4j-web:${log4j2_version}"
compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j2_version}"
compile "com.lmax:disruptor:${lmax_disruptor_version}"
// Unit tests
testCompile "org.springframework.boot:spring-boot-starter-test"
testCompile "io.projectreactor:reactor-test"
testCompile "org.testng:testng:${testng_version}"
}
def scriptsDirectory = "./scripts"
bootJar {
classifier = artifactClassifier
manifest {
attributes 'Manifest-Version': '1.0',
'Start-Class': 'com.demo.fn.DemoApplication',
'Jdk-Version': System.getProperty('java.version') + ' (' + System.getProperty("java.vm.vendor") + ')',
'Implementation-Version': version,
'Implementation-Date': getImplementationDate()
}
}
def getImplementationDate() {
def dateFormat = new java.text.SimpleDateFormat('MMM dd, yyyy HH:mm:ss z')
dateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT"))
return dateFormat.format(new java.util.Date())
}
springBoot {
mainClassName = 'com.demo.springboot.sleuth.DemoApplication'
}