-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
95 lines (76 loc) · 2.54 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
description = "FormKiQ Core - API Key Authorizer"
apply plugin: 'distribution'
def moduleName = "formkiq-module-lambda-authorizer-apikey"
dependencies {
annotationProcessor group: 'com.formkiq', name: 'graalvm-annotations-processor', version: '1.4.1'
implementation project(':aws-dynamodb')
implementation project(':dynamodb-documents')
implementation project(':fkq-lambda-services')
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.7'
implementation group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.2.3'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
implementation group: 'com.formkiq', name: 'lambda-runtime-graalvm', version:'2.5.0-SNAPSHOT'
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.2.0'
testImplementation project(':fkq-test-utils')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.10.1'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.19.4'
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.19.4'
}
compileJava {
options.annotationProcessorPath += configurations.runtimeClasspath
}
nativeImage {
outputFileName = "server"
mainClassName = "com.formkiq.lambda.runtime.graalvm.LambdaRuntime"
dockerImage = "ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.3"
enableHttp = true
enableHttps = true
enableStatic = true
systemProperty = ["java.net.preferIPv4Stack=true"]
}
test {
failFast = true
useJUnitPlatform()
}
/*
task buildZip(type: Zip) {
dependsOn test, graalvmNativeImage
inputs.files("${project.projectDir}/runtime/bootstrap", "${buildDir}/graalvm/server")
outputs.file("${buildDir}/${moduleName}.zip")
archiveFileName = "${moduleName}.zip"
destinationDirectory = file("${buildDir}")
from("${project.projectDir}/runtime") {
include 'bootstrap'
}
from("${buildDir}/graalvm") {
include 'server'
}
}*/
/*
task buildJava11Zip(type: Zip) {
from compileJava
into('lib') {
from configurations.default
}
}*/
//task buildDeploy {
// dependsOn assembleTemplate
//}
distZip.dependsOn graalvmNativeImage
tasks.distTar.enabled = false
distZip {
archiveFileName = "api/${moduleName}.zip"
}
distributions {
main {
contents {
from("runtime/") {
include "bootstrap"
}
from ("${buildDir}/graalvm") {
include("server")
}
into '/'
}
}
}