Update working bazel version to 0.5.2

New bazel version is also copied into x20.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161720869
This commit is contained in:
jianglai 2017-07-12 14:46:51 -07:00 committed by Ben McIlwain
parent 37f33e5e7a
commit fc327ec9fb

View file

@ -6,17 +6,19 @@ This document covers the steps necessary to download, build, and deploy Nomulus.
You will need the following programs installed on your local machine: You will need the following programs installed on your local machine:
* A recent version of the [Java 7 JDK][java-jdk7]. * A recent version of the [Java 8 JDK][java-jdk8].
* [Bazel build system](http://bazel.io/) >= version 0.4.2. Make sure to * [Bazel build system](http://bazel.io/) (version [0.5.2][bazel-0.5.2] works
download the JDK7-compatible version. as of 7/12/2015)
* [Google App Engine SDK for Java][app-engine-sdk], and configure aliases to * [Google App Engine SDK for Java][app-engine-sdk], and configure aliases to
to the `gcloud` and `appcfg.sh` utilities (you'll use them a lot). to the `gcloud` and `appcfg.sh` utilities (you'll use them a lot).
* [Git](https://git-scm.com/) version control system. * [Git](https://git-scm.com/) version control system.
**Note:** App Engine does not yet support Java 8. You need to make sure that you **Note:** App Engine does not yet support Java 8. Your code cannot use any Java
are using Java 7 to compile the project (consult the output of `java -version`). 8 feature such as lambda expression or stream, but your *can* use a Java 8
Also, the instructions in this document have only been tested on Linux. They version of bazel. Just make sure that you pass `--javacopt="-target 7 -source
might work with some alterations on other operating systems. 7"` when you build and test. Also, the instructions in this document have only
been tested on Linux. They might work with some alterations on other operating
systems.
## Download the codebase ## Download the codebase
@ -53,7 +55,8 @@ The first step is to build the project, and verify that this completes
successfully. This will also download and install dependencies. successfully. This will also download and install dependencies.
```shell ```shell
$ bazel --batch build //java{,tests}/google/registry/... $ bazel --batch build --javacopt="-target 7 -source 7" \
//java{,tests}/google/registry/...
INFO: Found 584 targets... INFO: Found 584 targets...
[ .. snip .. ] [ .. snip .. ]
INFO: Elapsed time: 124.433s, Critical Path: 116.92s INFO: Elapsed time: 124.433s, Critical Path: 116.92s
@ -83,7 +86,8 @@ You can run the tests to verify that all expected functionality succeeds in your
build: build:
```shell ```shell
$ nice bazel --batch test //javatests/google/registry/... \ $ nice bazel --batch test --javacopt="-target 7 -source 7" \
//javatests/google/registry/... \
--local_resources=1000,3,1.0 --local_resources=1000,3,1.0
Executed 360 out of 360 tests: 360 tests pass. Executed 360 out of 360 tests: 360 tests pass.
``` ```
@ -179,4 +183,5 @@ using the `nomulus` tool to create test entities in your newly deployed system.
See the [first steps tutorial](./first-steps-tutorial.md) for more information. See the [first steps tutorial](./first-steps-tutorial.md) for more information.
[app-engine-sdk]: https://cloud.google.com/appengine/docs/java/download [app-engine-sdk]: https://cloud.google.com/appengine/docs/java/download
[java-jdk7]: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html [java-jdk8]: http://www.oracle.com/technetwork/java/javase/downloads
[bazel-0.5.2]: https://github.com/bazelbuild/bazel/releases/download/0.5.2/bazel-0.5.2-installer-linux-x86_64.sh