From 8ff92a4a7d3eca01e01832ff5ed8f9f9229d4ffa Mon Sep 17 00:00:00 2001 From: ZHANG Dapeng Date: Thu, 6 Dec 2018 13:17:59 -0800 Subject: [PATCH] doc: emphasize building examples on master branch should follow COMPILING Resolves #5115 --- COMPILING.md | 5 +++-- RELEASING.md | 3 +++ examples/README.md | 8 +++++++- examples/android/README.md | 7 +------ examples/example-kotlin/README.md | 5 ++++- examples/example-tls/README.md | 9 ++++++++- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/COMPILING.md b/COMPILING.md index f75023cde2..e23a2f425e 100644 --- a/COMPILING.md +++ b/COMPILING.md @@ -1,12 +1,13 @@ Building gRPC-Java ================== -Building is only necessary if you are making changes to gRPC-Java. +Building is only necessary if you are making changes to gRPC-Java or testing/using a non-released + version (e.g. master HEAD) of gRPC-Java library. Building requires JDK 8, as our tests use TLS. grpc-java has a C++ code generation plugin for protoc. Since many Java -developers don't have C compilers installed and don't need to modify the +developers don't have C compilers installed and don't need to run or modify the codegen, the build can skip it. To skip, create the file `/gradle.properties` and add `skipCodegen=true`. diff --git a/RELEASING.md b/RELEASING.md index 1306ee504d..4c045236e4 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -42,8 +42,11 @@ $ VERSION_FILES=( examples/android/clientcache/app/build.gradle examples/android/helloworld/app/build.gradle examples/android/routeguide/app/build.gradle + examples/example-alts/build.gradle examples/example-kotlin/build.gradle examples/example-kotlin/android/helloworld/app/build.gradle + examples/example-tls/build.gradle + examples/example-tls/pom.xml ) ``` diff --git a/examples/README.md b/examples/README.md index 1196d78976..269fe16609 100644 --- a/examples/README.md +++ b/examples/README.md @@ -9,8 +9,11 @@ You may want to read through the [Quick Start Guide](https://grpc.io/docs/quickstart/java.html) before trying out the examples. -To build the examples, run in this directory: +To build the examples, +1. **[Install gRPC Java library SNAPSHOT locally, including code generation plugin](../COMPILING.md) (Only need this step for non-released versions, e.g. master HEAD).** + +2. Run in this directory: ``` $ ./gradlew installDist ``` @@ -41,6 +44,9 @@ information. ## Maven If you prefer to use Maven: +1. **[Install gRPC Java library SNAPSHOT locally, including code generation plugin](../COMPILING.md) (Only need this step for non-released versions, e.g. master HEAD).** + +2. Run in this directory: ``` $ mvn verify $ # Run the server diff --git a/examples/android/README.md b/examples/android/README.md index 3222c1260e..3ca21cc267 100644 --- a/examples/android/README.md +++ b/examples/android/README.md @@ -14,12 +14,7 @@ PREREQUISITES INSTALL ------- -1. (Only for non-released versions) Install gRPC Java -```sh -$ cd ../.. -$ ./gradlew install -PskipCodegen=true -$ cd examples/android -``` +1. **[Install gRPC Java library SNAPSHOT locally, including code generation plugin](../../COMPILING.md) (Only need this step for non-released versions, e.g. master HEAD).** 2. Install the app ```sh diff --git a/examples/example-kotlin/README.md b/examples/example-kotlin/README.md index b7dbcb390b..9a6a4400c9 100644 --- a/examples/example-kotlin/README.md +++ b/examples/example-kotlin/README.md @@ -9,8 +9,11 @@ You may want to read through the [Quick Start Guide](https://grpc.io/docs/quickstart/java.html) before trying out the examples. -To build the examples, run in this directory: +To build the examples, +1. **[Install gRPC Java library SNAPSHOT locally, including code generation plugin](../../COMPILING.md) (Only need this step for non-released versions, e.g. master HEAD).** + +2. Run in this directory: ``` $ ./gradlew installDist ``` diff --git a/examples/example-tls/README.md b/examples/example-tls/README.md index c431136099..69ef6af495 100644 --- a/examples/example-tls/README.md +++ b/examples/example-tls/README.md @@ -5,8 +5,11 @@ The example require grpc-java to already be built. You are strongly encouraged to check out a git release tag, since there will already be a build of grpc available. Otherwise you must follow [COMPILING](../COMPILING.md). -To build the example, run in this directory: +To build the example, +1. **[Install gRPC Java library SNAPSHOT locally, including code generation plugin](../../COMPILING.md) (Only need this step for non-released versions, e.g. master HEAD).** + +2. Run in this directory: ``` $ ../gradlew installDist ``` @@ -97,6 +100,10 @@ That's it! ## Maven If you prefer to use Maven: + +1. **[Install gRPC Java library SNAPSHOT locally, including code generation plugin](../../COMPILING.md) (Only need this step for non-released versions, e.g. master HEAD).** + +2. Run in this directory: ``` $ mvn verify $ # Run the server