/
build.gradle
50 lines (41 loc) · 1.18 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'application'
version = '1.0'
mainClassName = 'org.javaservicetemplate.core.Main'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
}
task copyConfig(type: Copy) {
from 'config.properties'
into "$buildDir/classes/"
}
compileJava.dependsOn copyConfig
dependencies {
compile 'com.google.inject:guice:4.1.0'
compile 'org.apache.commons:commons-lang3:3.5'
compile 'ch.qos.logback:logback-classic:1.2.2'
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'org.hibernate:hibernate-core:4.3.11.Final'
compile 'org.hibernate:hibernate-c3p0:4.3.11.Final'
compile 'com.mchange:c3p0:0.9.5.2'
compile 'org.jadira.usertype:usertype.core:4.0.0.GA'
compile 'org.postgresql:postgresql:42.0.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.7.19'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jar {
from sourceSets.main.allSource
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
task fatJar(type: Jar) {
manifest { attributes 'Main-Class': mainClassName }
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}