-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
71 lines (62 loc) · 1.49 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.1'
}
}
plugins {
id "java"
id "com.google.protobuf" version "0.8.1"
id "application"
}
group = 'org.example'
version = '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'application'
mainClassName = 'org.example.server.GrpcServer'
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.2.0"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.3.0'
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
generatedFilesBaseDir = "$projectDir/src/main/java/generated"
}
repositories {
mavenCentral()
}
dependencies {
compile 'io.grpc:grpc-all:1.3.0'
compile 'io.grpc:grpc-services:1.3.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
}
test {
useJUnitPlatform()
}
jar {
//Building as Far Jar for now
from configurations.compile.collect {zipTree it}
manifest {
attributes(
'Main-Class': 'org.example.server.GrpcServer'
)
}
}
// Copying all dependency libs into the buildDir so that they
// can be easily copied into Docker Image
tasks.register('copyToLib', Copy) {
into "$buildDir/output/lib"
from configurations.runtime
}