diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2015-06-19 14:03:08 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-06-19 15:31:53 +0000 |
commit | 8104c5b3992a36183c2a74d96e5736af09fb4626 (patch) | |
tree | 936597ace5b613855fbda8c73cc200f745a2255c | |
parent | 1c87a36a49dd3c3dbf2a0eac1e8d359fdeda4c00 (diff) |
Lower the requirement to Java 7
Now that we are using the error-prone javac, there is no need
to impose Java 8. However, because some of our tests are targetting
Java 8, developer should still use a JDK 8 to tests.
--
MOS_MIGRATED_REVID=96400914
-rw-r--r-- | .travis/jdk7.WORKSPACE | 12 | ||||
-rwxr-xr-x | scripts/bootstrap/buildenv.sh | 2 | ||||
-rw-r--r-- | site/contributing.md | 2 | ||||
-rw-r--r-- | site/docs/install.md | 27 | ||||
-rw-r--r-- | src/BUILD | 2 | ||||
-rw-r--r-- | tools/jdk/BUILD | 4 |
6 files changed, 15 insertions, 34 deletions
diff --git a/.travis/jdk7.WORKSPACE b/.travis/jdk7.WORKSPACE deleted file mode 100644 index e12d5be85b..0000000000 --- a/.travis/jdk7.WORKSPACE +++ /dev/null @@ -1,12 +0,0 @@ -maven_jar( - name = "java_langtools", - group_id = "com.google.errorprone", - version = "1.9.0-dev-r2644-1", - artifact_id = "javac", - sha1 = "85fd71e0fbee22349e8c6101287cb5e75866a7f2", -) - -bind( - name = "langtools", - actual = "@java_langtools//jar", -) diff --git a/scripts/bootstrap/buildenv.sh b/scripts/bootstrap/buildenv.sh index d59370d6d1..3be93df1c3 100755 --- a/scripts/bootstrap/buildenv.sh +++ b/scripts/bootstrap/buildenv.sh @@ -21,7 +21,7 @@ set -o errexit DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) WORKSPACE_DIR="$(dirname $(dirname ${DIR}))" -JAVA_VERSION=${JAVA_VERSION:-1.8} +JAVA_VERSION=${JAVA_VERSION:-1.7} BAZELRC=${BAZELRC:-"/dev/null"} PLATFORM="$(uname -s | tr 'A-Z' 'a-z')" diff --git a/site/contributing.md b/site/contributing.md index 39c9c3ac92..5af0248161 100644 --- a/site/contributing.md +++ b/site/contributing.md @@ -54,6 +54,8 @@ closer to a fully open development model in the future (also see ## Setting up your coding environment +_Note that some of our tests target Java 8 so you must test using a JDK 8._ + For now we have partial support for the Eclipse and IntelliJ IDEs for Java. We don't have IDE support for other languages in Bazel right now. diff --git a/site/docs/install.md b/site/docs/install.md index d5bfb1360f..d5577cd390 100644 --- a/site/docs/install.md +++ b/site/docs/install.md @@ -13,7 +13,7 @@ Supported platforms: Java: -* Java JDK 8 or later +* Java JDK 7 or later ## Downloading Bazel @@ -30,21 +30,12 @@ $ git clone https://github.com/google/bazel.git To build Bazel on Ubuntu: -#### 1. Install JDK 8: +#### 1. Install JDK 7: -**Ubuntu Trusty (14.04 LTS).** OpenJDK 8 is not available on Trusty. To -install Oracle JDK 8: +**Ubuntu Utopic (14.10) and Trusty (14.04 LTS).** To install OpenJDK 7: ``` -$ sudo add-apt-repository ppa:webupd8team/java -$ sudo apt-get update -$ sudo apt-get install oracle-java8-installer -``` - -**Ubuntu Utopic (14.10).** To install OpenJDK 8: - -``` -$ sudo apt-get install openjdk-8-jdk +$ sudo apt-get install openjdk-7-jdk ``` #### 2. Set the `JAVA_HOME` environment variable. @@ -55,16 +46,16 @@ First, check to see if it's already set: $ echo $JAVA_HOME ``` -If this prints the path to the JDK 8 root directory, proceed to the next +If this prints the path to the JDK 7 root directory, proceed to the next step. Otherwise, find the Java `bin` directory using `which javac` and use `javac -version` to verify that you have the right JDK version. Then set the `JAVA_HOME` environment variable to the `bin` directory parent. -For example, if the path is `/usr/lib/jvm/jdk1.8.0/bin/javac`, set the -`JAVA_HOME` variable to `/usr/lib/jvm/jdk1.8.0`: +For example, if the path is `/usr/lib/jvm/jdk1.7.0/bin/javac`, set the +`JAVA_HOME` variable to `/usr/lib/jvm/jdk1.7.0`: ``` -$ export JAVA_HOME=/usr/lib/jvm/jdk1.8.0 +$ export JAVA_HOME=/usr/lib/jvm/jdk1.7.0 ``` You can also add this line to your `~/.bashrc` file. @@ -91,7 +82,7 @@ Bazel on Mac OS X requires: * MacPorts or Homebrew for installing required packages. -* An installation of JDK 8. +* An installation of JDK 7. * For `objc_*` and `ios_*` rule support, you must have Xcode 6.1 or later with iOS SDK 8.1 installed on your system. @@ -48,7 +48,7 @@ genrule( VERSION_LINE=$$(cat $< | grep target_version); JAVA_VERSION=$$(echo $${VERSION_LINE} | sed -E 's/.*value="([^"])".*/\\1/'); if [ -z "$${JAVA_VERSION}" ]; then - echo "1.8" >$@ # Java 8 is the default + echo "1.7" >$@ # Java 7 is the default elif [[ "$${JAVA_VERSION}" =~ ^[0-9]+$$ ]]; then echo "1.$${JAVA_VERSION}" >$@ # Add 1. before 7 or 8 else diff --git a/tools/jdk/BUILD b/tools/jdk/BUILD index d17277b87d..8c1b257c22 100644 --- a/tools/jdk/BUILD +++ b/tools/jdk/BUILD @@ -73,8 +73,8 @@ filegroup( java_toolchain( name = "toolchain", encoding = "UTF-8", - source_version = "8", - target_version = "8", + source_version = "7", + target_version = "7", ) exports_files([ |