bbilger 8277d68aa9 update aws-java-gradle and aws-java-maven templates
- update the Java templates to work with lambda proxy integration
out-of-the-box
- use "Map<String, Object>" as input type for greater flexibility
- update gradle wrapper from 3.1 to 3.2.1
- configure gradle and maven to use Java 1.8
- change the package from "hello" to "com.serverless" and adjust
serverless.yml accordingly
- configure logging (log4j)
- adjust tests
- git-ignore some Eclipse specific files
2016-12-18 21:59:49 +01:00

43 lines
1.1 KiB
Groovy

apply plugin: 'java'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile (
'com.amazonaws:aws-lambda-java-core:1.1.0',
'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'
)
}
// 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.2.1'
}