-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
61 lines (49 loc) · 1.28 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
import com.amazonaws.services.lambda.model.Runtime
import jp.classmethod.aws.gradle.lambda.AWSLambdaMigrateFunctionTask
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'jp.classmethod.aws:gradle-aws-plugin:0.22'
}
}
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'jp.classmethod.aws.lambda'
group = 'quotes'
version = '1.0'
compileJava {
targetCompatibility = 1.8
sourceCompatibility = 1.8
}
repositories {
jcenter()
}
dependencies {
compile 'com.amazon.alexa:ask-sdk:2.7.2'
compile 'log4j:log4j:1.2.17'
compile 'org.slf4j:slf4j-api:1.7.10'
compile 'com.amazonaws:aws-lambda-java-log4j:1.0.0'
}
task buildZip(type: Zip) {
from compileJava
from processResources
into('lib') {
from configurations.runtime
}
}
aws {
region = 'eu-west-1'
}
task deploy(type: AWSLambdaMigrateFunctionTask, dependsOn: build) {
functionName = "alexa-frases-peliculas"
handler = "quotes.QuotesStreamHandler"
role = "arn:aws:iam::${aws.accountId}:role/lambda_basic_execution"
runtime = Runtime.Java8
zipFile = shadowJar.archivePath
memorySize = 512
timeout = 60
}
build.dependsOn shadowJar