diff --git a/build.gradle b/build.gradle index acfcbd6..57acf4a 100644 --- a/build.gradle +++ b/build.gradle @@ -22,14 +22,12 @@ plugins { id 'application' } -def grpcVersion = '1.22.0-SNAPSHOT' -def protobufVersion = '3.7.1' -def protocVersion = protobufVersion +def grpcVersion = '1.20.0' repositories { - // Use jcenter for resolving your dependencies. - // You can declare any Maven/Ivy/file repository here. - jcenter() + //maven{ url "https://maven-central.storage-download.googleapis.com/repos/central/data/" } + //mavenLocal() + mavenCentral() } dependencies { @@ -43,9 +41,9 @@ dependencies { compile 'org.glassfish:javax.annotation:10.0-b28' // grpc stuff - compile 'io.grpc:grpc-netty-shaded:1.20.0' - compile 'io.grpc:grpc-protobuf:1.20.0' - compile 'io.grpc:grpc-stub:1.20.0' + compile "io.grpc:grpc-netty-shaded:${grpcVersion}" + compile "io.grpc:grpc-protobuf:${grpcVersion}" + compile "io.grpc:grpc-stub:${grpcVersion}" compile 'io.netty:netty-tcnative-boringssl-static:2.0.22.Final' } @@ -59,7 +57,7 @@ protobuf { plugins { 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' -mainClassName = 'JobServ.JobServClient' -jar { - manifest { - attributes('Main-Class' : mainClassName) - } +task Server(type: CreateStartScripts) { + mainClassName = 'JobServ.JobServServer' + applicationName = 'jobserv-server' + outputDir = new File(project.buildDir, 'tmp') + 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 +} \ No newline at end of file