forked from sk887/inventory-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
190 lines (155 loc) · 7.02 KB
/
build.gradle
File metadata and controls
190 lines (155 loc) · 7.02 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}")
classpath("net.saliman:gradle-cobertura-plugin:2.3.0")
classpath("org.hidetake:gradle-ssh-plugin:2.0.0")
classpath('mysql:mysql-connector-java:5.1.39')
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3"
}
}
plugins {
id 'java'
id 'application'
id 'org.sonarqube' version '3.3'
}
group 'inventory-management'
version '1.0-SNAPSHOT'
configurations.all {
exclude group: 'commons-logging'
exclude group: 'org.apache.tomcat'
exclude group: "org.slf4j", module: "slf4j-log4j12"
exclude group: "org.slf4j", module: "slf4j-simple"
}
allprojects {
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://repo1.maven.org/maven2/' }
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
maven { url "https://repository.jboss.org/nexus/content/repositories/releases" }
maven { url 'http://dl.bintray.com/readytalk/maven' }
}
ext['hibernate.version'] = '4.3.11.Final'
bootRepackage {
mainClass = 'com.inventory.manager.service.Application'
}
springBoot {
mainClass = 'com.inventory.manager.service.Application'
}
sourceSets {
main {
java.srcDir "src/main/java"
resources.srcDir "src/main/resources"
}
test {
java.srcDir "src/test/java"
resources.srcDir "src/test/resources"
}
generated {
java {
srcDirs = ['src/main/generated']
}
}
}
configurations {
querydslapt
}
//@See https://discuss.gradle.org/t/integrating-spring-boot-querydsl-into-gradle-build/15421/2
task generateQueryDSL(type: org.gradle.api.tasks.compile.JavaCompile, group: 'build', description: 'Generates the QueryDSL query types') {
source = sourceSets.main.java
classpath = configurations.compile + configurations.querydslapt
options.compilerArgs = [
"-proc:only",
"-processor", "com.querydsl.apt.jpa.JPAAnnotationProcessor"
]
destinationDir = sourceSets.generated.java.srcDirs.iterator().next()
}
compileJava {
dependsOn generateQueryDSL
source generateQueryDSL.destinationDir
}
compileGeneratedJava {
dependsOn generateQueryDSL
options.warnings = false
classpath += sourceSets.main.runtimeClasspath
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-actuator:${spring_boot_version}"
compile "org.springframework.boot:spring-boot-starter-cache:${spring_boot_version}"
compile "org.springframework.boot:spring-boot-dependencies:${spring_boot_version}"
compile group: 'org.zalando', name: 'logbook-spring-boot-starter', version: '1.3.0'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jersey', version: spring_boot_version
compile("org.springframework.boot:spring-boot-starter-web:${spring_boot_version}") {
exclude module: 'spring-boot-starter-tomcat'
}
compile "org.hibernate:hibernate-jpamodelgen:5.0.12.Final"
compile 'org.springframework.retry:spring-retry:1.1.2.RELEASE'
compile "org.springframework.boot:spring-boot-starter-jetty:${spring_boot_version}"
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 "org.springframework.boot:spring-boot-starter-data-jpa:${spring_boot_version}"
compile("mysql:mysql-connector-java:5.1.39")
compile("org.projectlombok:lombok:1.16.8")
compile 'com.google.code.findbugs:jsr305:3.0.1'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: jackson_version
compile("org.springframework:spring-aspects:4.1.6.RELEASE")
compile("org.springframework:spring-context-support:4.1.6.RELEASE")
// Jackson Related
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("com.zaxxer:HikariCP:${HikariCP_version}") {
exclude(module: 'tools')
}
compile "commons-io:commons-io:${commons_io_version}"
compile "joda-time:joda-time:${joda_time_version}"
compile "joda-time:joda-time-hibernate:${joda_time_hibernate_version}"
compile("io.springfox:springfox-swagger2:${springfox_version}") {
exclude module: 'mapstruct'
}
compile "io.springfox:springfox-swagger-ui:${springfox_version}"
compile "com.querydsl:querydsl-jpa:4.1.4"
querydslapt "com.querydsl:querydsl-apt:4.1.4"
compile group: 'com.ning', name: 'async-http-client', version: '1.9.40'
//squirrel
compile "org.squirrelframework:squirrel-foundation:0.3.8"
//quartz dependencies
compile "org.quartz-scheduler:quartz:$quartz_version"
compile "org.quartz-scheduler:quartz-jobs:$quartz_version"
compile('com.github.oxo42:stateless4j:2.5.0') {
exclude group: "org.slf4j", module: "slf4j-jdk14"
}
//compile 'javax.servlet:javax.servlet-api:3.1.0'
//compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.22'
compile group: 'com.sun.jersey', name: 'jersey-bundle', version: '1.8'
testCompile("org.springframework.boot:spring-boot-starter-test:${spring_boot_version}") {
exclude group: 'org.assertj'
}
testCompile "org.springframework.boot:spring-boot-starter-jetty:${spring_boot_version}"
testCompile 'com.h2database:h2:1.4.194'
testCompile 'org.assertj:assertj-core:3.8.0'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
}
bootRun {
addResources = false
jvmArgs = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1234"]
}
bootRepackage {
enabled = false
}