-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
130 lines (112 loc) · 4.02 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
130
buildscript {
ext {
spring_boot_version = '2.1.0.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
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
// Repositories to work with
repositories {
// Local Maven Repo
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
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 {
reactor_version = "3.2.3.RELEASE"
reactor_addon_version = "3.2.0.RELEASE"
commons_collections4_version = "4.1"
commons_lang3_version = "3.7"
guava_version = "25.1-jre"
jackson_version = "2.9.6"
// Logging related
slf4j_version = "1.7.25"
log4j2_version = "2.11.1"
lmax_disruptor_version = "3.4.2"
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-webflux"
compile "org.springframework.boot:spring-boot-starter-aop"
compile "org.springframework.boot:spring-boot-starter-log4j2"
compile "org.springframework.boot:spring-boot-starter-actuator"
// Project Reactor Version
compile "io.projectreactor:reactor-core:${reactor_version}"
compile "io.projectreactor.addons:reactor-extra:${reactor_addon_version}"
compile "com.google.guava:guava:${guava_version}"
compile "org.apache.commons:commons-lang3:${commons_lang3_version}"
compile "org.apache.commons:commons-collections4:${commons_collections4_version}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:${jackson_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}"
}
bootJar {
manifest {
attributes 'Manifest-Version': '1.0',
'Start-Class': 'com.demo.DemoSSEEmitter',
'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())
}
bootRun {
main = 'com.demo.DemoApplication'
jvmArgs = [
'-XX:+UseStringDeduplication',
'-Xms1g',
'-Xmx1g',
'-Xdebug',
'-Xrunjdwp:transport=dt_socket,address=8802,server=y,suspend=n',
'-Dspring.profiles.active=local',
'-DprocessingHostName=localhost',
'-DprocessingInstance=instance1',
'-DspringAppProfile=local',
'-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector',
'-Dlog4j.shutdownHookEnabled=false'
]
}