-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (87 loc) · 2.73 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
}
}
plugins {
id "java"
id "org.jetbrains.kotlin.jvm" version "1.5.32"
id "com.google.protobuf" version "0.8.18"
id "idea" // adds proto files and generated Java files as source dirs
}
protobuf {
protoc {
// The version of protoc must match protobuf-java. If you don't depend on
// protobuf-java directly, you will be transitively depending on the
// protobuf-java version that grpc depends on.
artifact = "com.google.protobuf:protoc:3.19.1"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:1.43.1"
}
grpckt {
artifact = "io.grpc:protoc-gen-grpc-kotlin:1.2.0:jdk7@jar"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
grpckt {}
}
}
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
}
}
repositories {
mavenCentral()
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
implementation "io.reactivex.rxjava3:rxkotlin:3.0.1"
implementation "io.grpc:grpc-all:1.43.1"
implementation "io.grpc:grpc-kotlin-stub:1.2.0"
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'org.slf4j:slf4j-log4j12:1.7.32'
implementation 'io.github.microutils:kotlin-logging-jvm:2.1.21'
testImplementation "org.junit.jupiter:junit-jupiter:5.8.2"
testImplementation "org.assertj:assertj-core:3.21.0"
testImplementation "org.mockito.kotlin:mockito-kotlin:4.0.0"
}
task runService(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass.set("com.github.lumber1000.simex.service.SimexService")
}
task runMonitor(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass.set("com.github.lumber1000.simex.clients.MarketDataMonitor")
}
task runTestClient(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass.set("com.github.lumber1000.simex.clients.TestClient")
}
task runRandomTrader(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass.set("com.github.lumber1000.simex.clients.RandomTrader")
}