server and client are talking

This commit is contained in:
Aidan Hahn 2019-05-17 12:05:17 -07:00
parent e476438c8c
commit cf5a5f122b
No known key found for this signature in database
GPG key ID: 327711E983899316

View file

@ -22,14 +22,12 @@ plugins {
id 'application' id 'application'
} }
def grpcVersion = '1.22.0-SNAPSHOT' def grpcVersion = '1.20.0'
def protobufVersion = '3.7.1'
def protocVersion = protobufVersion
repositories { repositories {
// Use jcenter for resolving your dependencies. //maven{ url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
// You can declare any Maven/Ivy/file repository here. //mavenLocal()
jcenter() mavenCentral()
} }
dependencies { dependencies {
@ -43,9 +41,9 @@ dependencies {
compile 'org.glassfish:javax.annotation:10.0-b28' compile 'org.glassfish:javax.annotation:10.0-b28'
// grpc stuff // grpc stuff
compile 'io.grpc:grpc-netty-shaded:1.20.0' compile "io.grpc:grpc-netty-shaded:${grpcVersion}"
compile 'io.grpc:grpc-protobuf:1.20.0' compile "io.grpc:grpc-protobuf:${grpcVersion}"
compile 'io.grpc:grpc-stub:1.20.0' compile "io.grpc:grpc-stub:${grpcVersion}"
compile 'io.netty:netty-tcnative-boringssl-static:2.0.22.Final' compile 'io.netty:netty-tcnative-boringssl-static:2.0.22.Final'
} }
@ -59,7 +57,7 @@ protobuf {
plugins { plugins {
grpc { grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.20.0' artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
} }
} }
@ -70,10 +68,22 @@ protobuf {
} }
} }
apply plugin: 'application' task Server(type: CreateStartScripts) {
mainClassName = 'JobServ.JobServClient' mainClassName = 'JobServ.JobServServer'
jar { applicationName = 'jobserv-server'
manifest { outputDir = new File(project.buildDir, 'tmp')
attributes('Main-Class' : mainClassName) classpath = startScripts.classpath
} }
task Client(type: CreateStartScripts) {
mainClassName = 'JobServ.JobServClient'
applicationName = 'jobserv-client'
outputDir = new File(project.buildDir, 'tmp')
classpath = startScripts.classpath
}
applicationDistribution.into('bin') {
from(Server)
from(Client)
fileMode = 0755
} }