-
Notifications
You must be signed in to change notification settings - Fork 92
/
build.gradle.kts
59 lines (47 loc) · 1.65 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
import configurations.CompilerSettings.KOTLIN_JVM_TARGET
import configurations.CompilerSettings.KOTLIN_USE_IR_COMPILER
import configurations.Languages.attachRemoteRepositories
import crypto.BuildVerification.SIGNATURE_PACKAGE
import crypto.BuildVerification.SIGNATURE_SUFFIX
import dependencies.Libraries.BOUNCYCASTLE
import dependencies.Libraries.KOTLIN_COROUTINES_CORE
import dependencies.Libraries.KTOR_SERIALIZATION
import dependencies.Libraries.KTOR_SERVER_NETTY
import dependencies.Libraries.KTOR_SERVER_HOST_COMMON
import dependencies.Libraries.KTOR_SERVER_SERVLET
import dependencies.Libraries.LOGBACK_CLASSIC
import dependencies.Libraries.KOTLIN_SERIALIZATION_JSON
import dependencies.Libraries.TNOODLE_SCRAMBLES
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
description = "Embeddable webserver built around the Kotlin ktor framework"
attachRemoteRepositories()
plugins {
kotlin("jvm")
KOTLIN_SERIALIZATION
KOTLINX_ATOMICFU
}
dependencies {
api(KTOR_SERVER_NETTY)
api(KOTLIN_SERIALIZATION_JSON)
api(KOTLIN_COROUTINES_CORE)
api(TNOODLE_SCRAMBLES)
implementation(KTOR_SERIALIZATION)
implementation(KTOR_SERVER_HOST_COMMON)
implementation(KTOR_SERVER_SERVLET)
implementation(BOUNCYCASTLE)
runtimeOnly(LOGBACK_CLASSIC)
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = KOTLIN_JVM_TARGET
kotlinOptions.useIR = KOTLIN_USE_IR_COMPILER
}
tasks.create("deleteSignatures") {
doLast {
delete(fileTree("src/main/resources/$SIGNATURE_PACKAGE").matching {
include("**/*.$SIGNATURE_SUFFIX")
})
}
}
tasks.withType<ProcessResources> {
finalizedBy("deleteSignatures")
}