-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
84 lines (75 loc) · 2.45 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
buildscript {
ext.kotlin_version = '1.3.21'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.+'
}
}
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'com.google.protobuf'
mainClassName = 'ch.unibas.dmi.dbis.covis.server.main.Main'
defaultTasks 'run'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.+'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.+'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.+'
implementation 'io.github.microutils:kotlin-logging:1.+'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.+'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.+'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.7.0'
implementation group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.7.0'
implementation group: 'io.grpc', name: 'grpc-all', version: '1.20.0'
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
testImplementation("org.junit.jupiter:junit-jupiter:5.4.2")
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}
jar {
manifest { attributes 'Main-Class': mainClassName }
from {
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.7.0'
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.20.0'
}
}
generatedFilesBaseDir = "$projectDir/generated/"
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
test {
maxParallelForks = 1
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
sourceSets {
main {
java {
srcDir 'generated/main/java'
srcDir 'generated/main/grpc'
}
proto {
srcDir 'covis-proto/src/main/protobuf'
}
}
}