-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
38 lines (32 loc) · 1018 Bytes
/
build.gradle
File metadata and controls
38 lines (32 loc) · 1018 Bytes
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
apply plugin: 'java'
repositories {
mavenCentral()
}
sourceCompatibility = 1.11
targetCompatibility = 1.11
dependencies {
compile (
'com.amazonaws:aws-java-sdk-core:1.9.9',
'com.amazonaws:aws-lambda-java-core:1.2.1',
'com.amazonaws:aws-lambda-java-events:2.2.9',
'com.amazonaws:aws-lambda-java-log4j:1.0.0',
'com.fasterxml.jackson.core:jackson-core:2.8.5',
'com.fasterxml.jackson.core:jackson-databind:2.8.5',
'com.fasterxml.jackson.core:jackson-annotations:2.8.5',
'io.leangen.graphql:spqr:0.10.1',
'com.google.guava:guava:30.0-jre'
)
}
// http://docs.aws.amazon.com/lambda/latest/dg/create-deployment-pkg-zip-java.html
task buildZip(type: Zip) {
from compileJava
from processResources
into('lib') {
from configurations.runtime
}
}
task deploy(type: Exec, dependsOn: 'build') {
commandLine 'serverless', 'deploy'
}
deploy.dependsOn build
build.dependsOn buildZip