-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (48 loc) · 1.31 KB
/
build.gradle.kts
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
import org.jetbrains.gradle.plugins.docker.DockerImage
plugins {
kotlin("jvm") version "1.9.22"
kotlin("plugin.serialization") version "1.9.22"
id("org.jetbrains.gradle.docker") version "1.6.0-RC.5"
application
}
group = "net.senohrabek.jakub"
version = "0.0.2"
repositories {
mavenCentral()
}
dependencies {
implementation("org.slf4j:slf4j-api:2.0.9")
implementation("ch.qos.logback:logback-classic:1.5.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
implementation("aws.sdk.kotlin:ecs:1.0.78")
implementation("io.ktor:ktor-client-apache5:2.3.9")
testImplementation("org.jetbrains.kotlin:kotlin-test")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
docker {
fun DockerImage.setupJvmAppWithCustomArgs(runArgs: String, jvmArgs: String) {
setupJvmApp("amazoncorretto", "17")
buildArgs = mutableMapOf(
"PARAMS" to runArgs,
"JAVA_OPTS" to jvmArgs,
)
files {
from("Dockerfile") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
}
images {
prometheusNodeFinder {
setupJvmAppWithCustomArgs("", "")
}
}
}
application {
mainClass.set("net.senohrabek.jakub.prometheus.nodefinder.MainKt")
}