aboutsummaryrefslogtreecommitdiff
path: root/examples/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'examples/build.gradle')
-rw-r--r--examples/build.gradle47
1 files changed, 47 insertions, 0 deletions
diff --git a/examples/build.gradle b/examples/build.gradle
new file mode 100644
index 000000000..f9f7eb73b
--- /dev/null
+++ b/examples/build.gradle
@@ -0,0 +1,47 @@
+apply plugin: 'application'
+apply plugin: 'protobuf'
+
+description = "grpc Examples"
+
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath libraries.protobuf_plugin
+ }
+}
+
+dependencies {
+ compile project(':grpc-core'),
+ project(':grpc-netty'),
+ project(':grpc-okhttp'),
+ project(':grpc-stub')
+}
+
+protobufCodeGenPlugins = ["java_plugin:$rootDir/compiler/build/binaries/java_pluginExecutable/java_plugin"]
+generateProto.dependsOn ':grpc-compiler:java_pluginExecutable'
+
+task mathserver(type: JavaExec) {
+ main = "io.grpc.examples.MathServer"
+ description = "Executes the math server."
+ classpath = sourceSets.main.runtimeClasspath
+}
+
+task mathclient(type: JavaExec) {
+ main = "io.grpc.examples.MathClient"
+ description = "Executes the math client."
+ classpath = sourceSets.main.runtimeClasspath
+}
+
+task stockserver(type: JavaExec) {
+ main = "io.grpc.examples.StockServer"
+ description = "Executes the stock server."
+ classpath = sourceSets.main.runtimeClasspath
+}
+
+task stockclient(type: JavaExec) {
+ main = "io.grpc.examples.StockClient"
+ description = "Executes the stock client."
+ classpath = sourceSets.main.runtimeClasspath
+}