From 407ae56d25332ffb82e65c3979e02df9a7866c67 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Fri, 29 Mar 2019 00:25:10 +0100 Subject: [PATCH] Switch to java 8 Official support for Java 7 was discontinued on April 2015: [1]. [1] https://www.java.com/en/download/faq/java_7.xml Change-Id: I3aaf3eba118aaec3114a6dce8e93eda9dff4a18d --- .buckconfig | 2 ++ Documentation/dev-buck.txt | 2 +- gerrit-main/src/main/java/Main.java | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.buckconfig b/.buckconfig index b347a96a88..3ce69da9cd 100644 --- a/.buckconfig +++ b/.buckconfig @@ -20,6 +20,8 @@ [java] jar_spool_mode = direct_to_jar src_roots = java, resources, src + source_level = 8 + target_level = 8 [project] ignore = .git, eclipse-out, bazel-gerrit, bin diff --git a/Documentation/dev-buck.txt b/Documentation/dev-buck.txt index 315c0b06b3..dd707f5647 100644 --- a/Documentation/dev-buck.txt +++ b/Documentation/dev-buck.txt @@ -3,7 +3,7 @@ == Installation -You need to use Java 7 and Node.js for building gerrit. +You need to use Java 8 and Node.js for building gerrit. There is currently no binary distribution of Buck, so it has to be manually built and installed. Apache Ant and gcc are required. Currently only Linux diff --git a/gerrit-main/src/main/java/Main.java b/gerrit-main/src/main/java/Main.java index a29f1c66a6..58de6a453f 100644 --- a/gerrit-main/src/main/java/Main.java +++ b/gerrit-main/src/main/java/Main.java @@ -31,11 +31,11 @@ public final class Main { private static boolean onSupportedJavaVersion() { final String version = System.getProperty("java.specification.version"); - if (1.7 <= parse(version)) { + if (1.8 <= parse(version)) { return true; } - System.err.println("fatal: Gerrit Code Review requires Java 7 or later"); + System.err.println("fatal: Gerrit Code Review requires Java 8 or later"); System.err.println(" (trying to run on Java " + version + ")"); return false; }