-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
89 lines (71 loc) · 2.23 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
86
87
88
89
import java.util.*
plugins {
application
kotlin("jvm") version "1.3.72"
id("com.google.cloud.tools.jib") version "2.5.0"
}
group = "Mpeix Backend"
version = "1.1.01"
application {
mainClassName = "com.kekmech.MainKt"
}
repositories {
mavenCentral()
jcenter()
}
fun ktor(module: String, version: String? = null) = "io.ktor:ktor-$module${version?.let { ":$version" } ?: ""}"
fun jooq(module: String, version: String? = null) = "org.jooq:jooq$module${version?.let { ":$version" } ?: ""}"
dependencies {
implementation(platform(kotlin("bom")))
implementation(kotlin("stdlib"))
implementation(platform(ktor("bom", "1.3.1")))
implementation(ktor("server-core"))
implementation(ktor("server-netty"))
implementation(ktor("gson"))
implementation(ktor("client-gson"))
implementation(ktor("client-okhttp"))
implementation(ktor("network-tls"))
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("com.squareup.okhttp3:logging-interceptor:4.8.0")
implementation("com.github.ben-manes.caffeine:caffeine:2.8.5")
implementation("org.koin:koin-core:2.1.6")
implementation("org.postgresql:postgresql:42.2.14")
implementation("org.jsoup:jsoup:1.13.1")
implementation(jooq("", "3.13.4"))
implementation(jooq("-meta", "3.13.4"))
implementation(jooq("-codegen", "3.13.4"))
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
}
jib {
to {
image = "tonykolomeytsev/mpeix-backend-map-service:latest"
auth {
val secretsFile = File("${System.getProperty("user.home")}/mpeix/docker.secret")
if (secretsFile.exists()) {
val secrets = Properties()
secrets.load(secretsFile.inputStream())
username = secrets.getProperty("username")
password = secrets.getProperty("password")
}
}
container {
mainClass = "com.kekmech.MainKt"
ports = listOf("8080", "80")
}
}
}
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
test {
useJUnitPlatform()
}
}