-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
68 lines (60 loc) · 1.57 KB
/
build.gradle
File metadata and controls
68 lines (60 loc) · 1.57 KB
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
group 'com.if4031'
version '1.0'
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.0'
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile 'io.grpc:grpc-all:0.8.0'
compile 'org.mongodb:mongo-java-driver:3.0.3'
}
protobuf {
protoc {
// The version of protoc must match protobuf-java. If you don't depend on
// protobuf-java directly, you will be transitively depending on the
// protobuf-java version that grpc depends on.
artifact = "com.google.protobuf:protoc:3.0.0-alpha-3.1"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:0.8.0'
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
generatedFilesBaseDir = "$projectDir/src/generated"
}
task clientJar(type: Jar){
manifest {
attributes 'Main-Class': 'com.if4031.proto.ChatClient'
}
baseName = 'chat-client'
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
task serverJar(type: Jar){
manifest {
attributes 'Main-Class': 'com.if4031.proto.ChatServer'
}
baseName = 'chat-server'
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}