From 71f37c50f9a09e374603eaf4be0306b4fd51a07d Mon Sep 17 00:00:00 2001 From: Evawere Ogbe Date: Fri, 29 Mar 2019 15:54:51 -0700 Subject: [PATCH] Add bazel build instructions to README (#543) Add bazel build instructions to README --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index e3811703..3e5a4cdd 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,55 @@ Google APIs and help you to utilize them more efficiently. You can also use these definitions with open source tools to generate client libraries, documentation, and other artifacts. +## Building +### Bazel + +The recommended way to build the API client libraries is through +[Bazel](https://bazel.build/) >= 0.23.0. + +First, [install bazel](https://docs.bazel.build/versions/master/install.html). + +To build all libraries: + +``` +bazel build //... +``` + +To test all libraries: + +``` +bazel test //... +``` + +To build one library in all languages: + +``` +bazel build //google/example/library/v1/... +``` + +To build the Java package for one library: + +``` +bazel build //google/example/library/v1:google-cloud-library-v1-java +``` + +Bazel packages exist in all the libraries for Java and Go. + +### Artman + API client libraries can be built directly from files in this repo using [Artman](https://github.com/googleapis/artman). The latest generation status can be tracked [here](https://circleci.com/gh/googleapis/googleapis) which currently has status [![CircleCI](https://circleci.com/gh/googleapis/googleapis.svg?style=svg)](https://circleci.com/gh/googleapis/googleapis). +To build the Java package for one library: + +``` +artman --config google/example/library/artman_library_example_v1.yaml generate java_gapic +``` + +Artman can only build one library in one language at a time. + For more details on all Google APIs and developer tools, see the [Google Developers](https://developers.google.com/products/) site.