-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
88 lines (71 loc) · 1.92 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
85
86
87
88
plugins {
id "com.google.protobuf" version "0.8.18"
id 'java'
id 'application'
// these are for debugging
id 'org.barfuin.gradle.taskinfo' version '1.0.5'
}
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
group 'com.flipkart'
version '1.0-SNAPSHOT'
def grpc_version = "1.13.1"
def protobufVersion = '3.3.1'
def protocVersion = "3.5.1-1"
repositories {
maven {
url "https://maven-central.storage-download.googleapis.com/maven2/"
}
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
implementation "io.grpc:grpc-all:${grpc_version}"
implementation "com.google.protobuf:protobuf-java:${protobufVersion}"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
implementation 'javax.annotation:javax.annotation-api:1.3.2'
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpc_version}"
}
}
generatedFilesBaseDir = "$projectDir/src/main/generated"
generateProtoTasks {
all().each { task ->
task.builtins {
java {}
}
task.plugins {
grpc {}
}
}
}
}
sourceSets {
main {
java {
srcDirs 'src/main/java'
srcDirs 'src/generated/main/java'
}
}
}
test {
useJUnitPlatform()
}
startScripts.enabled = false
task startAJukebox(type: CreateStartScripts) {
mainClass = 'com.flipkart.grpcsampleclients.JukeboxClient'
applicationName = 'start-a-grpc-jukebox-client'
outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
classpath = startScripts.classpath
}
applicationDistribution.into('bin') {
from(startAJukebox)
fileMode = 0755
}