-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
94 lines (77 loc) · 2.84 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
90
91
92
93
94
/*
Copyright (C) 2015 - 2019 Electronic Arts Inc. All rights reserved.
This file is part of the Orbit Project <https://www.orbit.cloud>.
See license in LICENSE.
*/
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinCoroutinesVersion by extra("1.3.5")
val ktorVersion by extra("1.3.2")
val jacksonVersion by extra("2.10.3")
val orbitVersion by extra("2.0.0-alpha.101")
val grpcVersion by extra("1.28.1")
val jetcdVersion by extra("0.5.0")
val kodeinVersion by extra("6.5.5")
val slf4jVersion by extra("1.7.28")
val jumpConsistentHashVersion by extra("1.0.0")
val mainClass = "orbit.carnival.AppKt"
plugins {
val kotlinVersion = "1.4.0"
base
kotlin("jvm") version kotlinVersion
}
repositories {
mavenCentral()
jcenter()
maven { url = uri("https://maven.pkg.github.com") }
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$kotlinCoroutinesVersion")
implementation("io.ktor:ktor-server-core:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")
implementation("io.ktor:ktor-gson:$ktorVersion")
implementation("io.ktor:ktor-jackson:$ktorVersion")
implementation("io.ktor:ktor-serialization:$ktorVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion")
implementation("cloud.orbit:orbit-client:$orbitVersion")
implementation("io.grpc:grpc-netty-shaded:$grpcVersion")
implementation("io.grpc:grpc-protobuf:$grpcVersion")
implementation("io.grpc:grpc-stub:$grpcVersion")
implementation("io.etcd:jetcd-all:$jetcdVersion")
implementation("org.kodein.di:kodein-di-generic-jvm:$kodeinVersion")
implementation("org.slf4j:slf4j-simple:$slf4jVersion")
implementation("com.github.ssedano:jump-consistent-hash:$jumpConsistentHashVersion")
}
tasks.withType<KotlinJvmCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += listOf("-Xopt-in=kotlin.RequiresOptIn")
}
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val fatJar = task("fatJar", type = Jar::class) {
archiveClassifier.set("release")
archiveVersion.set("")
manifest {
attributes["Implementation-Version"] = project.version
attributes["Main-Class"] = mainClass
}
from(configurations.runtimeClasspath.get().map {
if (it.isDirectory) {
it
} else {
zipTree(it)
}
})
with(tasks["jar"] as CopySpec)
}