Add bazel build instructions to README (#543)

Add bazel build instructions to README
This commit is contained in:
Evawere Ogbe 2019-03-29 15:54:51 -07:00 committed by GitHub
parent 72d21983b4
commit 71f37c50f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 0 deletions

View File

@ -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.