-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
164 lines (135 loc) · 4.34 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
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
apply plugin: 'java'
apply plugin: 'jacoco'
group = "amosalexa"
version = '1.0'
def coverageSourceDirs = [
'src/main/java'
]
compileJava {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
}
sourceSets {
main {
java {
srcDirs = ["src/main/java"]
}
}
test {
java {
srcDirs = ["src/test/java"]
}
}
}
jar {
manifest {
attributes 'Main-Class': 'amosalexa.server.Launcher',
'Implementation-Title': 'AMOS Alexa',
'Implementation-Version': version
}
}
repositories {
jcenter()
mavenCentral()
maven {
url 'https://repo.spring.io/libs-snapshot'
}
}
dependencies {
compile 'com.amazon.alexa:alexa-skills-kit:1.3.1'
compile 'com.amazonaws:aws-lambda-java-core:1.0.0'
compile 'com.amazonaws:aws-java-sdk-dynamodb:1.11.150'
compile 'com.amazonaws:aws-java-sdk-ses:1.11.150'
compile 'com.amazonaws:aws-java-sdk-code-generator:1.11.150'
compile 'log4j:log4j:1.2.17'
compile 'org.slf4j:slf4j-api:1.7.10'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'org.eclipse.jetty:jetty-server:9.0.6.v20130930'
compile 'org.eclipse.jetty:jetty-servlet:9.0.6.v20130930'
compile 'com.squareup.okhttp3:okhttp:3.8.0'
compile 'com.google.code.gson:gson:2.8.0'
compile group: 'org.json', name: 'json', version: '20090211'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.0.1'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
compile group: 'joda-time', name: 'joda-time', version: '2.9.4'
compile 'se.walkercrou:google-places-api-java:2.1.7'
compile 'com.google.maps:google-maps-services:0.1.20'
compile 'org.springframework.hateoas:spring-hateoas:0.24.0.BUILD-SNAPSHOT'
compile 'org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE'
compile 'com.jayway.jsonpath:json-path:2.2.0'
compile 'org.jtwig:jtwig-core:5.85.3.RELEASE'
compile 'org.reflections:reflections:0.9.10'
testCompile 'junit:junit:4.12'
}
task fatJar(type: Jar) {
baseName = project.name + '-fat'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task buildZip(type: Zip) {
baseName = project.name + '-fat'
from compileJava
from processResources
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
into('lib') {
from configurations.runtime
}
}
allprojects {
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
systemProperty "file.encoding", "UTF-8"
}
}
task simpleTests(type: Test) {
outputs.upToDateWhen { false }
useJUnit {
excludeCategories 'amosalexa.AmosAlexaExtendedTest'
}
}
task extendedTests(type: Test) {
outputs.upToDateWhen { false }
useJUnit {
excludeCategories 'amosalexa.AmosAlexaSimpleTest'
}
}
jacoco {
toolVersion = "0.7.6.201602180812"
}
//Can be made dependent on successfull test task (if desired)
//task testReport(type: JacocoReport, dependsOn: "test") {
task testReport(type: JacocoReport) {
String s = "${buildDir}"
//System.out.println("buildDir: " + s)
group = "Reporting"
description = "Generate Jacoco code coverage report after running tests."
reports {
xml.enabled true
html.enabled false
csv.enabled false
xml.destination "$buildDir/reports/jacoco/report.xml"
}
classDirectories = fileTree(dir: './build/classes/')
sourceDirectories = files(coverageSourceDirs)
executionData = files("${project.buildDir}/jacoco/simpleTests.exec")
}
task testReportAll(type: JacocoReport) {
String s = "${buildDir}"
//System.out.println("buildDir: " + s)
group = "Reporting"
description = "Generate Jacoco code coverage report after running tests."
reports {
xml.enabled true
html.enabled false
csv.enabled false
xml.destination "$buildDir/reports/jacoco/report.xml"
}
classDirectories = fileTree(dir: './build/classes/')
sourceDirectories = files(coverageSourceDirs)
executionData = files("${project.buildDir}/jacoco/test.exec")
}
build.dependsOn fatJar
build.dependsOn buildZip