-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
110 lines (95 loc) · 3.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
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
buildscript {
ext {
springBootVersion = '1.5.1.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'promocodes'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url 'http://dynamodb-local.s3-website-us-west-2.amazonaws.com/release'
}
}
dependencies {
compile 'com.amazonaws:aws-java-sdk-dynamodb:1.11.93'
compile 'org.springframework.boot:spring-boot-starter'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'io.jsonwebtoken:jjwt:0.7.0'
compile "org.webjars:angularjs:1.4.3"
compile "org.webjars:jquery:2.1.1"
compile "org.webjars:bootstrap:3.2.0"
compile "org.webjars:webjars-locator:+"
compile "org.springframework.boot:spring-boot-starter-security"
compile "org.springframework.security.oauth:spring-security-oauth2"
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'com.amazonaws:DynamoDBLocal:1.11.0.1'
testCompile 'org.assertj:assertj-core:3.6.1'
}
test {
jacoco {
excludes = [
"com.czequered.promocodes.config.*",
"com.czequered.promocodes.controller.*Dev",
"com.czequered.promocodes.service.*Dev",
"com.czequered.promocodes.service.*Exception",
"com.czequered.promocodes.PromoCodesApp"
]
}
testLogging {
showStandardStreams = true
}
doFirst {
def libs = configurations.testCompile
.filter { it.name.endsWith('.dylib') || it.name.endsWith('.so') || it.name.endsWith('.dll') }
.collect { it.parent }
.join(File.pathSeparator)
systemProperty "java.library.path", "$libs"
}
}
bootRun {
systemProperty "spring.profiles.active", "prod"
}
task bootRunDev(type: org.springframework.boot.gradle.run.BootRunTask, group: "application") {
main = "com.czequered.promocodes.PromoCodesApp"
classpath = sourceSets.main.runtimeClasspath
systemProperty "spring.profiles.active", "dev"
}
jacocoTestReport {
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(it).matching {
exclude 'com/czequered/promocodes/config/**',
'com/czequered/promocodes/**/*Dev.*',
'com/czequered/promocodes/**/*Exception.*',
'com/czequered/promocodes/PromoCodesApp.*'
}
})
}
reports {
xml.enabled true
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
check.dependsOn jacocoTestReport
tasks.withType(JavaCompile) {
def ci = System.getenv("CI") ?: "none"
options.incremental = ci == "none"
logger.lifecycle("Running ${options.incremental ? 'locally' : 'in ' + ci}, task $name ${options.incremental ? '' : 'not'} using incremental compilation.")
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4.1'
}