-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
90 lines (73 loc) · 1.81 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
apply from: "./libraries.gradle"
ext {
javaLanguageLevel = '1.7'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.0.RELEASE")
}
}
allprojects { project ->
repositories {
mavenCentral()
}
// YOU SHALL NOT PASS!
configurations {
all*.exclude module: 'commons-logging'
}
}
subprojects { subProject ->
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
targetCompatibility = rootProject.javaLanguageLevel
sourceCompatibility = rootProject.javaLanguageLevel
idea {
module {
inheritOutputDirs = false
downloadJavadoc = true
downloadSources = true
outputDir = file("$buildDir/classes/main/")
}
}
// common dependencies for all projects
dependencies {
// logging
compile libraries.logback
compile libraries.slf4jApi
compile libraries.jsr305
// testing
testCompile libraries.assertJ
testCompile libraries.mockito
testCompile libraries.junit
testCompile libraries.restAssured
testCompile libraries.springBootTest
runtime libraries.groovy
}
sourceSets {
main.resources.srcDirs = ['src/main/resources']
test.java.srcDirs = ['src/test/java']
}
compileJava {
options.encoding = 'UTF-8'
}
javadoc {
options.encoding = 'UTF-8'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
testLogging {
exceptionFormat = 'full'
}
}
}
// task for setting up gradle wrapper
task wrapper(type: Wrapper) {
gradleVersion = '2.2'
}