-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle
70 lines (58 loc) · 1.7 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
buildscript {
repositories {
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.4'
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
apply plugin: 'idea'
version = '1.3.11'
group = 'grpcbridge'
repositories {
mavenCentral()
}
ext {
ver = [
protobuf : '3.24.0',
grpc : '1.58.0',
opencensus : '0.26.0',
slf4j : '1.7.30',
]
}
dependencies {
implementation "org.slf4j:slf4j-api:${ver.slf4j}"
implementation "com.google.protobuf:protobuf-java:${ver.protobuf}"
implementation "com.google.protobuf:protobuf-java-util:${ver.protobuf}"
implementation "io.grpc:grpc-protobuf:${ver.grpc}"
testImplementation 'junit:junit:4.12'
testImplementation 'org.assertj:assertj-core:3.14.0'
}
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")
}
}
}