-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
102 lines (83 loc) · 2.07 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
95
96
97
98
99
100
101
102
import com.google.protobuf.gradle.*
plugins {
java
application
id("com.github.johnrengelman.shadow") version "5.2.0"
id("com.google.protobuf") version "0.8.8"
kotlin("jvm") version "1.3.70"
}
group = "app.ryss"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
application {
mainClassName = "app.ryss.service.LauncherKt"
}
dependencies {
// Protobuf
implementation("com.google.protobuf", "protobuf-java", "3.6.1")
implementation("io.grpc", "grpc-stub", "1.15.1")
implementation("io.grpc", "grpc-protobuf", "1.15.1")
protobuf(files("src/main/proto"))
// Logging
implementation("org.slf4j", "slf4j-api", "2.0.0-alpha1")
implementation("ch.qos.logback", "logback-classic", "1.3.0-alpha5")
implementation("io.github.microutils", "kotlin-logging", "1.7.9")
// Sentry
implementation("io.sentry", "sentry", "1.7.30")
implementation("io.sentry", "sentry-logback", "1.7.30")
// Util
implementation("io.github.cdimascio", "java-dotenv", "5.1.4")
// Kotlin
implementation(kotlin("stdlib-jdk8"))
// Tests
testImplementation("junit", "junit", "4.12")
}
sourceSets {
create("proto") {
proto {
srcDir("src/main/proto")
}
}
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
jar {
archiveClassifier.value = "original"
}
shadowJar {
archiveFileName.value = "kotlin-service.jar"
}
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.11.4"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.28.0"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
id("grpc")
}
}
}
}
/**
* Represents the mutable value of a [Property].
*/
var <T> Property<T>.value: T?
get() = orNull
set(value) = set(value)