-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
67 lines (55 loc) · 1.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
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
group 'com.spaceuptech.space_api'
version '0.1.0'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
def grpcVersion = '1.21.0' // CURRENT_GRPC_VERSION
dependencies {
implementation 'com.google.code.gson:gson:2.8.5'
compile "com.google.api.grpc:proto-google-common-protos:0.1.9"
compile "io.grpc:grpc-netty:${grpcVersion}"
compile "io.grpc:grpc-protobuf:${grpcVersion}"
compile "io.grpc:grpc-stub:${grpcVersion}"
// testCompile "io.grpc:grpc-testing:${grpcVersion}"
testCompile "junit:junit:4.12"
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.7.1'
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
generatedFilesBaseDir = "$projectDir/src/main/java"
}
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
// Generate IntelliJ IDEA's .idea & .iml project files
apply plugin: 'idea'
// Provide convenience executables for trying out the examples.
//apply plugin: 'application'
//startScripts.enabled = false