-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
46 lines (39 loc) · 1.05 KB
/
build.gradle
File metadata and controls
46 lines (39 loc) · 1.05 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
46
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.4.1/samples
*/
plugins {
id 'java-library'
}
repositories {
mavenCentral()
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
dependencies {
implementation 'com.amazonaws:aws-lambda-java-core:1.2.1'
implementation 'com.amazonaws:aws-lambda-java-events:3.9.0'
implementation files('libs/new-java-lib.jar')
}
task buildZip(type: Zip, dependsOn: clean) {
archiveFileName = "function.zip"
from compileJava
from processResources
from ('collector.yaml')
into('lib') {
from(jar)
from(configurations.runtimeClasspath)
}
}
task getLayerDep(type: Copy, dependsOn: buildZip) {
into "$buildDir/layer/java/lib"
from(configurations.runtimeClasspath)
}
task buildLayer(type: Zip, dependsOn: getLayerDep) {
archiveFileName = "layer.zip"
from("$buildDir/layer/")
}