-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
45 lines (38 loc) · 1.45 KB
/
build.gradle
File metadata and controls
45 lines (38 loc) · 1.45 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
apply plugin: 'java'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
// changed from: compile(...) (deprecated) NICO
// thanks: https://stackoverflow.com/questions/59367435/how-to-make-a-jar-file-with-dependencies-by-gradle-7-0
implementation 'com.amazonaws:aws-lambda-java-core:1.1.0'
implementation 'com.amazonaws:aws-lambda-java-log4j:1.0.0'
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.10'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.10'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.10'
}
// 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
// changed from: baseName (deprecated) NICO
archiveBaseName = "hello"
from compileJava
from processResources
into('lib') {
from configurations.runtime
}
}
build.dependsOn buildZip
// Outcommented previous version of gradle. Was 3.5 but hardcoding new version didn't work
// error: task wrapper already exists!
/*task wrapper(type: Wrapper) {
gradleVersion = '6.2.1'
}*/