This repository was archived by the owner on Feb 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathbuild.gradle
More file actions
61 lines (52 loc) · 1.25 KB
/
build.gradle
File metadata and controls
61 lines (52 loc) · 1.25 KB
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
buildscript {
repositories {
jcenter()
}
}
plugins {
id 'jacoco'
id 'java'
id 'groovy'
id 'application'
id 'idea'
id 'eclipse'
}
group = "examples"
sourceCompatibility = '1.8'
mainClassName = 'app.App'
test {
jacoco {
destinationFile = file("${buildDir}/jacoco/test.exec")
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
test.finalizedBy(jacocoTestReport)
repositories {
jcenter()
}
dependencies {
implementation deps.projects.smartappcore
implementation deps.projects.smartthingsclient
implementation deps.aws.lambdaJavaCore
implementation deps.aws.lambdaLogging
testImplementation deps.groovy.all
testImplementation deps.test.spockCore
}
jacocoTestReport.dependsOn(test)
task buildZip(type: Zip) {
from compileJava
from processResources
into('lib') {
// AWS docs seem to be a bit off here.
// https://docs.aws.amazon.com/lambda/latest/dg/create-deployment-pkg-zip-java.html
// They use compileClasspath here but when we use a library that uses others, we
// need runtimeClasspath to avoid class not found exceptions.
from configurations.runtimeClasspath
}
}
build.dependsOn buildZip