-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (89 loc) · 2.62 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
buildscript {
ext {
springBootVersion = '1.2.5.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'cctv-server'
version = '0.0.1'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
sourceSets {
generated {
java {
srcDirs = ['src/generated']
}
}
}
configurations {
providedRuntime
querydslapt
all*.exclude group: 'commons-logging', module: 'commons-logging'
all*.exclude group: 'log4j', module: 'log4j'
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all*.exclude group: 'org.slf4j', module: 'slf4j-jcl'
all*.exclude group: 'org.slf4j', module: 'slf4j-jdk14'
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("mysql:mysql-connector-java:5.1.36")
compile("com.mysema.querydsl:querydsl-jpa:3.6.5")
compile("org.modelmapper:modelmapper:0.7.4")
compile("org.apache.commons:commons-lang3:3.4")
compile("commons-io:commons-io:2.4")
compile("commons-codec:commons-codec:1.10")
compile("org.imgscalr:imgscalr-lib:4.2")
compile("com.google.guava:guava:19.0-rc1")
compile("org.projectlombok:lombok:1.16.4")
querydslapt("com.mysema.querydsl:querydsl-apt:3.6.5")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
task generateSources(type: JavaCompile, group: 'build', description: 'Generates the QueryDSL query types') {
source = sourceSets.main.java
classpath = configurations.compile + configurations.querydslapt
options.compilerArgs = [
"-proc:only",
"-processor", "com.mysema.query.apt.jpa.JPAAnnotationProcessor"
]
destinationDir = sourceSets.generated.java.srcDirs.iterator().next()
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
bootRepackage {
classifier = 'exec'
}
compileJava {
dependsOn generateSources
source generateSources.destinationDir
}
compileGeneratedJava {
dependsOn generateSources
options.warnings = false
classpath += sourceSets.main.runtimeClasspath
}
clean {
delete sourceSets.generated.java.srcDirs
}
idea {
module {
sourceDirs += file('src/generated')
}
}