-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (91 loc) · 2.78 KB
/
build.gradle
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
103
104
105
106
107
108
109
plugins {
id 'java'
id 'application'
id 'com.google.protobuf' version '0.9.4'
id 'org.jetbrains.kotlin.jvm' version '2.1.0'
id "com.github.ben-manes.versions" version "0.51.0"
}
group 'org.athenian'
version '1.0-SNAPSHOT'
repositories {
google()
mavenCentral()
}
kotlin {
jvmToolchain(11)
}
def annotationVersion = "1.3.2"
def coroutinesVersion = '1.9.0'
def grpcVersion = '1.69.0'
def logbackVersion = '1.5.12'
def loggingVersion = '7.0.3'
def protocVersion = '3.25.3'
def slf4jVersion = '2.0.13'
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-slf4j:$coroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-debug:$coroutinesVersion"
implementation "io.grpc:grpc-netty-shaded:$grpcVersion"
implementation "io.grpc:grpc-protobuf:$grpcVersion"
implementation "io.grpc:grpc-stub:$grpcVersion"
implementation "io.grpc:grpc-services:$grpcVersion"
implementation "io.github.oshai:kotlin-logging:$loggingVersion"
implementation "ch.qos.logback:logback-classic:$logbackVersion"
implementation "org.slf4j:jul-to-slf4j:$slf4jVersion"
compileOnly "javax.annotation:javax.annotation-api:$annotationVersion"
testImplementation "io.grpc:grpc-testing:$grpcVersion"
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protocVersion"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion"
}
}
generateProtoTasks {
all().each { task ->
task.plugins {
grpc {} // Generate Java gRPC classes
}
}
}
}
compileKotlin.dependsOn ':generateProto'
startScripts.enabled = false
task ChunkerServer(type: CreateStartScripts) {
mainClassName = 'org.athenian.chunker.ChunkerServer'
applicationName = 'chunker-server'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
}
task ChunkerClient(type: CreateStartScripts) {
mainClassName = 'org.athenian.chunker.ChunkerClient'
applicationName = 'chunker-client'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
}
applicationDistribution.into('bin') {
from(ChunkerServer)
from(ChunkerClient)
fileMode = 0755
}
compileKotlin {
kotlinOptions {
freeCompilerArgs += ['-Xuse-experimental=kotlin.ExperimentalStdlibApi']
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs += ['-Xuse-experimental=kotlin.ExperimentalStdlibApi']
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat "full"
showStandardStreams = true
}
}