-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
155 lines (131 loc) · 6.25 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}")
classpath("io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'io.spring.dependency-management'
defaultTasks 'bootRun'
jar {
baseName = 'springbootdemo'
version = '0.0.1-SNAPSHOT'
}
bootRepackage {
mainClass = 'com.springboot.demo.Application'
}
springBoot {
mainClass = 'com.springboot.demo.Application'
}
bootRun {
addResources = false
}
if (project.hasProperty('prod')) { //./gradlew -Pprod bootRun
apply from: 'profile_prod.gradle'
} else if (project.hasProperty('fast')) {
apply from: 'profile_fast.gradle'
} else {
apply from: 'profile_dev.gradle'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'http://repo.spring.io/milestone' }
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'https://repository.jboss.org/nexus/content/repositories/releases' }
maven { url 'https://oss.sonatype.org/content/repositories/releases' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'http://repo.maven.apache.org/maven2' }
}
dependencies {
compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: dropwizard_metrics_version
compile group: 'io.dropwizard.metrics', name: 'metrics-annotation', version: dropwizard_metrics_version
compile group: 'com.ryantenney.metrics', name: 'metrics-spring', version: '3.1.3'
compile group: 'org.springframework.boot', name: 'spring-boot-actuator' ,version: spring_boot_version
compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure' , version: spring_boot_version
compile group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version: spring_boot_version
compile group: 'org.springframework.boot', name: 'spring-boot-loader-tools', version: spring_boot_version
compile group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: spring_boot_version
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: spring_boot_version
compile(group: 'org.springframework.boot', name: 'spring-boot-starter-redis', version: spring_boot_version) {
exclude group: 'commons-logging'
}
compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: spring_boot_version
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jetty', version: spring_boot_version
compile(group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: spring_boot_version) {
exclude module: 'spring-boot-starter-tomcat'
}
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-json-org',
version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-hppc',
version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda',
version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-hibernate4',
version: jackson_version
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations',
version: jackson_version
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind',
version:jackson_version
compile group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.13'
compile(group: 'com.zaxxer', name: 'HikariCP', version: HikariCP_version) {
exclude(module: 'tools')
}
compile group: 'commons-lang', name: 'commons-lang', version: commons_lang_version
compile group: 'commons-io', name: 'commons-io', version: commons_io_version
compile group: 'javax.inject', name: 'javax.inject', version: javax_inject_version
compile group: 'javax.transaction', name: 'javax.transaction-api', version: javax_transaction_version
compile group: 'joda-time', name: 'joda-time', version: joda_time_version
compile group: 'joda-time', name: 'joda-time-hibernate', version: joda_time_hibernate_version
compile group: 'org.hibernate', name: 'hibernate-core', version: hibernate_entitymanager_version
compile group: 'org.hibernate', name: 'hibernate-envers'
compile(group: 'org.hibernate', name: 'hibernate-ehcache') {
exclude(module: 'ehcache-core')
}
compile group: 'org.hibernate', name: 'hibernate-validator', version: hibernate_validator_version
compile group: 'org.jadira.usertype', name: 'usertype.core', version: usertype_core_version
compile group: 'org.projectlombok', name: 'lombok', version: lombok_version
compile(group: 'io.springfox', name: 'springfox-swagger2', version: springfox_version) {
exclude module: 'mapstruct'
}
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: springfox_version
runtime("com.h2database:h2")
runtime("mysql:mysql-connector-java")
testCompile group: 'com.jayway.awaitility', name: 'awaitility', version: awaility_version
testCompile group: 'com.jayway.jsonpath', name: 'json-path'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
testCompile group: 'org.assertj', name: 'assertj-core', version: assertj_core_version
testCompile group: 'junit', name: 'junit'
testCompile group: 'org.mockito', name: 'mockito-core'
testCompile group: 'org.hamcrest', name: 'hamcrest-library'
}
configurations.all {
resolutionStrategy {
// force certain versions of dependencies (including transitive)
// *append new forced modules:
force group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jackson_version
force group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jackson_version
force group: 'joda-time', name: 'joda-time', version: joda_time_version
}
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}
clean {
delete "target"
}
task wrapper(type: Wrapper) {
gradleVersion = '2.6'
}