-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
92 lines (79 loc) · 3.36 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
plugins {
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.application") version "4.0.3"
}
version = "test"
group = "ses.notification.lambda"
repositories {
mavenCentral()
}
dependencies {
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("io.micronaut.serde:micronaut-serde-processor")
annotationProcessor("io.micronaut:micronaut-http-validation")
annotationProcessor("io.micronaut.validation:micronaut-validation-processor")
implementation("com.amazonaws:aws-lambda-java-events:3.11.2")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut.aws:micronaut-aws-lambda-events-serde")
implementation("io.micronaut.aws:micronaut-aws-sdk-v2")
implementation("io.micronaut.aws:micronaut-function-aws")
implementation("io.micronaut.aws:micronaut-function-aws-custom-runtime")
implementation("io.micronaut.email:micronaut-email-amazon-ses") {
exclude(group: "software.amazon.awssdk", module: "apache-client")
exclude(group: "software.amazon.awssdk", module: "netty-nio-client")
}
// implementation("io.micronaut.email:micronaut-email-template")
implementation("io.micronaut.reactor:micronaut-reactor")
implementation("io.micronaut.reactor:micronaut-reactor-http-client")
implementation("io.micronaut.serde:micronaut-serde-jackson")
implementation("io.micronaut.validation:micronaut-validation")
implementation("jakarta.validation:jakarta.validation-api")
implementation("jakarta.annotation:jakarta.annotation-api")
implementation("software.amazon.awssdk:dynamodb") {
exclude(group: "software.amazon.awssdk", module: "apache-client")
exclude(group: "software.amazon.awssdk", module: "netty-nio-client")
}
implementation("software.amazon.awssdk:url-connection-client")
compileOnly("org.graalvm.nativeimage:svm")
compileOnly("org.projectlombok:lombok")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("org.yaml:snakeyaml")
testImplementation("org.assertj:assertj-core")
testImplementation "org.testcontainers:localstack:1.16.3"
testImplementation "org.testcontainers:junit-jupiter:1.16.3"
testImplementation("io.micronaut.aws:micronaut-aws-sdk-v1") { // needed by test containers + localstack
exclude(group: "software.amazon.awssdk", module: "apache-client")
exclude(group: "software.amazon.awssdk", module: "netty-nio-client")
}
}
application {
mainClass.set("ses.notification.lambda.FunctionLambdaRuntime")
}
java {
sourceCompatibility = JavaVersion.toVersion("17")
targetCompatibility = JavaVersion.toVersion("17")
}
micronaut {
runtime("lambda_provided")
testRuntime("junit5")
processing {
incremental(true)
annotations("ses.notification.lambda.*")
}
}
test {
// Load environment variables for tests
environment "AWS_PROFILE", System.getenv('AWS_PROFILE')
environment "REPORTING_FROM", System.getenv('REPORTING_FROM')
environment "REPORTING_TO", System.getenv('REPORTING_TOS')
}
tasks {
// TODO: set this configuration once issue https://github.com/micronaut-projects/micronaut-gradle-plugin/issues/820
// is solved.
// dockerfile {
// baseImage = 'amazoncorretto:17-alpine3.18'
// }
dockerBuild {
images = ["${System.env.DOCKER_IMAGE ?: project.name}:$project.version"]
}
}