2016-11-02 21:35:33 +08:00

37 lines
857 B
Groovy

apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile (
'com.amazonaws:aws-lambda-java-core:1.1.0',
'com.amazonaws:aws-lambda-java-events:1.3.0'
)
}
// Task for building the zip file for upload
task buildZip(type: Zip) {
// Using the Zip API from gradle to build a zip file of all the dependencies
//
// The path to this zip file can be set in the serverless.yml file for the
// package/artifact setting for deployment to the S3 bucket
//
// Link: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html
// set the base name of the zip file
baseName = "hello"
from compileJava
from processResources
into('lib') {
from configurations.runtime
}
}
build.dependsOn buildZip
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}