-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
140 lines (122 loc) · 3.43 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.30'
id "com.google.protobuf" version "0.8.15"
id "com.adarshr.test-logger" version "2.1.1"
id "java"
id "application"
id "idea"
}
group = 'de.zwei'
version = '1.0-SNAPSHOT'
ext {
grpcVersion = "1.32.1"
grpcKotlinVersion = "1.0.0"
protobufVersion = "3.15.1"
}
application {
mainClassName = "de.zwei.shibi.Application"
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'io.grpc:grpc-services:1.32.1'
implementation 'io.grpc:grpc-netty:1.35.0'
implementation "io.ktor:ktor-server-core:1.5.1"
implementation "io.ktor:ktor-server-jetty:1.5.1"
implementation "io.ktor:ktor-client-jetty:1.5.1"
implementation "io.ktor:ktor-client-serialization:1.5.1"
implementation "io.ktor:ktor-client-gson:1.5.1"
implementation "io.ktor:ktor-gson:1.5.1"
implementation "ch.qos.logback:logback-classic:1.2.3"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation 'com.github.schildbach:public-transport-enabler:master-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:1.7.25'
if (JavaVersion.current().isJava9Compatible()) {
compile 'javax.annotation:javax.annotation-api:1.3.1'
}
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
api 'io.grpc:grpc-kotlin-stub:1.0.0'
api 'com.google.protobuf:protobuf-java-util:3.15.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
task shibiRun {
group = "Shibi"
description = "Runs Shibi service"
dependsOn 'generateProto'
dependsOn 'run'
}
task shibiJar {
group = "Shibi"
description = "Builds Shibi service jar file"
dependsOn 'generateProto'
dependsOn 'check'
dependsOn 'build'
dependsOn 'jar'
}
test {
useJUnitPlatform()
}
clean {
delete protobuf.generatedFilesBaseDir
}
compileKotlin {
kotlinOptions.jvmTarget = "15"
kotlinOptions.useIR = true
}
compileTestKotlin {
kotlinOptions.jvmTarget = "15"
}
jar {
manifest {
attributes 'Main-Class': 'de.zwei.shibi.Application'
}
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}
protobuf {
generatedFilesBaseDir = "$buildDir/generated/sources"
protoc {
artifact = "com.google.protobuf:protoc:3.15.1"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.32.1'
}
grpckt {
artifact = 'io.grpc:protoc-gen-grpc-kotlin:1.0.0:jdk7@jar'
}
}
generateProtoTasks {
ofSourceSet('main')*.plugins { task ->
grpc { }
grpckt { }
}
}
}
sourceSets.main.java.srcDir new File(buildDir, 'generated/source')
idea {
module {
generatedSourceDirs += file('build/generated/sources')
}
}
testlogger {
theme 'mocha-parallel'
showExceptions true
showStackTraces true
showFullStackTraces false
showCauses true
slowThreshold 2000
showSummary true
showSimpleNames false
showPassed true
showSkipped true
showFailed true
showStandardStreams false
showPassedStandardStreams true
showSkippedStandardStreams true
showFailedStandardStreams true
}