-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
164 lines (136 loc) · 5.57 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
buildscript {
ext {
springBootVersion = '1.2.2.RELEASE'
springLoadedVersion = '1.2.0.RELEASE'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "http://repo.spring.io/release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
classpath("net.saliman:gradle-cobertura-plugin:2.2.6")
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath("org.springframework:springloaded:$springLoadedVersion")
}
}
import static java.nio.charset.Charset.defaultCharset
ext {
droolsVersion = '6.2.0.Final'
}
group 'com.bhlangonijr'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'spring-boot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets.main.resources.srcDirs = ["src/main/resources"]
def jvmEncoding = defaultCharset().name()
if (jvmEncoding != "UTF-8") {
throw new IllegalStateException("Build environment must be UTF-8 (it is: $jvmEncoding) - add '-Dfile.encoding=UTF-8' to the GRADLE_OPTS environment variable ")
}
if (!JavaVersion.current().java8Compatible) {
throw new IllegalStateException("Must be built with Java 8 or higher")
}
compileJava.enabled = true
mainClassName = "com.bhlangonijr.Application"
/*
springBoot {
classifier = 'exec'
}
*/
jar {
baseName = "drools-dynamic"
version = project.version
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven { url "http://repo1.maven.org/maven2/" }
maven { url "http://maven.restlet.org" }
maven { url "http://repo.spring.io/release" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/snapshot" }
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
def springVersion = "4.1.5.RELEASE"
def springIntegrationVersion = "4.1.2.RELEASE"
def springIntegrationDslVersion = "1.0.1.RELEASE"
def metricsVersion = "3.1.0"
def hystrixVersion = "1.4.9"
// Spring
ext.springFramework = "org.springframework:spring-context:$springVersion"
ext.springContextSupport = "org.springframework:spring-context-support:$springVersion"
ext.springBeans = "org.springframework:spring-beans:$springVersion"
ext.springBoot = "org.springframework.boot:spring-boot:$springBootVersion"
// Test dependencies
ext.junit = 'junit:junit:4.11'
ext.springTest = "org.springframework:spring-test:$springVersion"
// Hystrix
ext.hystrixCore = "com.netflix.hystrix:hystrix-core:${hystrixVersion}"
ext.hystrixMetricsPublisher = "com.netflix.hystrix:hystrix-servo-metrics-publisher:${hystrixVersion}"
ext.hystrixJavanica = "com.netflix.hystrix:hystrix-javanica:${hystrixVersion}"
ext.hystrixStream = "com.netflix.hystrix:hystrix-metrics-event-stream:${hystrixVersion}"
dependencies {
compile springFramework
compile springContextSupport
compile springBeans
compile springBoot
compile hystrixCore
compile hystrixJavanica
compile hystrixStream
compile hystrixMetricsPublisher
compile("org.springframework.boot:spring-boot:$springBootVersion")
compile("org.springframework.integration:spring-integration-core:$springIntegrationVersion")
compile("org.springframework.integration:spring-integration-java-dsl:$springIntegrationDslVersion")
compile("org.springframework.integration:spring-integration-stream:$springIntegrationVersion")
compile("org.springframework.integration:spring-integration-rmi:$springIntegrationVersion")
compile("org.springframework.integration:spring-integration-jmx:$springIntegrationVersion")
compile("org.springframework.integration:spring-integration-amqp:$springIntegrationVersion")
compile("org.springframework:spring-webmvc:$springVersion")
compile("org.springframework.boot:spring-boot-starter-thymeleaf:$springBootVersion")
compile("org.springframework.security:spring-security-config:4.0.2.RELEASE")
compile("org.springframework.security:spring-security-web:4.0.2.RELEASE")
compile("io.dropwizard.metrics:metrics-core:$metricsVersion")
compile("io.dropwizard.metrics:metrics-healthchecks:$metricsVersion")
compile("io.dropwizard.metrics:metrics-graphite:$metricsVersion")
compile("com.fasterxml.jackson:jackson-parent:2.5")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.5.2")
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.5.2")
compile("javax.servlet:javax.servlet-api:3.1.0")
compile("org.webjars:bootstrap:3.3.4")
compile("org.webjars:jquery:2.1.4")
compile("org.thymeleaf:thymeleaf-spring3:2.0.17")
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework.boot:spring-boot-starter-tomcat")
compile "org.kie:kie-api:$droolsVersion"
compile "org.drools:drools-core:$droolsVersion"
compile "org.drools:drools-compiler:$droolsVersion"
compile "ch.qos.logback:logback-classic:1.1.3"
testCompile junit
testCompile springTest
testCompile("org.springframework.boot:spring-boot-starter-test")
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2'
}
task stage(type: Copy, dependsOn: [clean, build]) {
from jar.archivePath
into project.rootDir
rename {
'app.jar'
}
}
stage.mustRunAfter(clean)
clean << {
project.file('app.jar').delete()
}