-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
85 lines (73 loc) · 2.34 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
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
import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
plugins {
val kotlinVersion = "2.0.20"
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.jetbrains.kotlin.kapt") version kotlinVersion
id("org.jetbrains.kotlin.plugin.allopen") version kotlinVersion
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.micronaut.application") version "3.7.8"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
}
version = "0.1"
group = "com.faforever.ice"
val kotlinVersion = project.properties.get("kotlinVersion")
repositories {
mavenCentral()
}
dependencies {
kapt("io.micronaut:micronaut-http-validation")
implementation("io.micronaut:micronaut-websocket")
implementation("io.micronaut:micronaut-jackson-databind")
implementation("io.micronaut.kotlin:micronaut-kotlin-runtime")
implementation("jakarta.annotation:jakarta.annotation-api")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
runtimeOnly("ch.qos.logback:logback-classic")
implementation("io.micronaut:micronaut-validation")
runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
}
application {
mainClass.set("com.faforever.ice.telemetry.ApplicationKt")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
}
tasks {
compileKotlin {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
named<DockerBuildImage>("dockerBuild") {
images.empty()
images.add("faforever/faf-telemetry-server")
}
}
graalvmNative.toolchainDetection.set(false)
micronaut {
runtime("netty")
testRuntime("junit5")
processing {
incremental(true)
annotations("com.faforever.ice.*")
}
}
docker {
registryCredentials {
val envUsername = System.getenv("DOCKER_USERNAME")
val envPassword = System.getenv("DOCKER_PASSWORD")
if (envUsername != null && envPassword != null) {
println("Setting up Docker registry login")
username.set(envUsername)
password.set(envPassword)
} else {
println("No docker credentials defined")
}
}
}