blob: 18e2b551c582ccca81096101aabae0e8d061ae3b [file] [log] [blame]
apply plugin: 'application'
description = "grpc Examples"
startScripts.enabled = false
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath libraries.protobuf_plugin
}
}
dependencies {
compile project(':grpc-core'),
project(':grpc-netty'),
project(':grpc-protobuf'),
project(':grpc-stub'),
libraries.jsonp
}
configureProtoCompilation()
task routeGuideServer(type: JavaExec) {
main = "io.grpc.examples.routeguide.RouteGuideServer"
description = "Executes the route guide server."
classpath = sourceSets.main.runtimeClasspath
}
task routeGuideClient(type: JavaExec) {
main = "io.grpc.examples.routeguide.RouteGuideClient"
description = "Executes the route guide client."
classpath = sourceSets.main.runtimeClasspath
}
task helloWorldServer(type: JavaExec) {
main = "io.grpc.examples.helloworld.HelloWorldServer"
description = "Executes the hello world server."
classpath = sourceSets.main.runtimeClasspath
}
task helloWorldClient(type: JavaExec) {
main = "io.grpc.examples.helloworld.HelloWorldClient"
description = "Executes the hello world client."
classpath = sourceSets.main.runtimeClasspath
}
// Allow intellij projects to refer to generated-sources
idea {
module {
// The whole build dir is excluded by default, but we need build/generated-sources,
// which contains the generated proto classes.
excludeDirs = [file('.gradle')]
if (buildDir.exists()) {
excludeDirs += files(buildDir.listFiles())
excludeDirs -= file("$buildDir/generated-sources")
}
}
}