2019-05-15 12:29:36 -07:00
|
|
|
/*
|
|
|
|
|
* This file was generated by the Gradle 'init' task.
|
|
|
|
|
*
|
|
|
|
|
* This generated file contains a sample Java project to get you started.
|
|
|
|
|
* For more details take a look at the Java Quickstart chapter in the Gradle
|
|
|
|
|
* User Manual available at https://docs.gradle.org/5.2.1/userguide/tutorial_java_projects.html
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
id 'java'
|
2019-05-17 01:28:26 -07:00
|
|
|
id 'com.google.protobuf' version '0.8.8'
|
2019-05-15 12:29:36 -07:00
|
|
|
id 'application'
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-17 12:05:17 -07:00
|
|
|
def grpcVersion = '1.20.0'
|
2019-05-15 12:29:36 -07:00
|
|
|
|
|
|
|
|
repositories {
|
2019-05-17 12:05:17 -07:00
|
|
|
//maven{ url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
|
|
|
|
|
//mavenLocal()
|
|
|
|
|
mavenCentral()
|
2019-05-15 12:29:36 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
// This dependency is found on compile classpath of this component and consumers.
|
|
|
|
|
implementation 'com.google.guava:guava:27.0.1-jre'
|
|
|
|
|
|
|
|
|
|
// Use JUnit test framework
|
2019-05-21 13:56:37 -07:00
|
|
|
testImplementation "io.grpc:grpc-testing:${grpcVersion}"
|
|
|
|
|
testImplementation "junit:junit:4.12"
|
|
|
|
|
testImplementation "org.mockito:mockito-core:2.25.1"
|
2019-05-15 12:29:36 -07:00
|
|
|
|
2019-05-17 01:28:26 -07:00
|
|
|
// Used by GRPC generated code
|
|
|
|
|
compile 'org.glassfish:javax.annotation:10.0-b28'
|
|
|
|
|
|
2019-05-15 12:29:36 -07:00
|
|
|
// grpc stuff
|
2019-05-18 16:40:58 -07:00
|
|
|
compile "io.grpc:grpc-netty:${grpcVersion}"
|
2019-05-17 12:05:17 -07:00
|
|
|
compile "io.grpc:grpc-protobuf:${grpcVersion}"
|
|
|
|
|
compile "io.grpc:grpc-stub:${grpcVersion}"
|
2019-05-15 12:29:36 -07:00
|
|
|
compile 'io.netty:netty-tcnative-boringssl-static:2.0.22.Final'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Define the main class for the application
|
2019-05-17 01:28:26 -07:00
|
|
|
mainClassName = 'JobServ.JobServClient'
|
2019-05-15 12:29:36 -07:00
|
|
|
|
|
|
|
|
protobuf {
|
|
|
|
|
protoc {
|
|
|
|
|
artifact = "com.google.protobuf:protoc:3.7.1"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
grpc {
|
2019-05-17 12:05:17 -07:00
|
|
|
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
|
2019-05-15 12:29:36 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
generateProtoTasks {
|
|
|
|
|
all()*.plugins {
|
|
|
|
|
grpc {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-17 12:05:17 -07:00
|
|
|
task Server(type: CreateStartScripts) {
|
|
|
|
|
mainClassName = 'JobServ.JobServServer'
|
|
|
|
|
applicationName = 'jobserv-server'
|
|
|
|
|
outputDir = new File(project.buildDir, 'tmp')
|
|
|
|
|
classpath = startScripts.classpath
|
2019-05-17 01:28:26 -07:00
|
|
|
}
|
2019-05-17 12:05:17 -07:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|