forked from akalini/grpcbridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
64 lines (53 loc) · 1.52 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.7'
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
apply plugin: 'idea'
repositories {
jcenter()
}
ext {
ver = [
protobuf: '3.0.0',
grpc: '0.15.0'
]
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.21'
compile group: 'com.google.protobuf', name: 'protobuf-java', version: ver.protobuf
compile group: 'com.google.protobuf', name: 'protobuf-java-util', version: ver.protobuf
compile group: 'io.grpc', name: 'grpc-protobuf', version: ver.grpc
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core-java8:1.0.0m1'
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:' + ver.protobuf
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:' + ver.grpc
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
idea {
module {
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java");
sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/grpc");
sourceDirs += file("${protobuf.generatedFilesBaseDir}/test/java");
sourceDirs += file("${protobuf.generatedFilesBaseDir}/test/grpc");
}
}
}