Build with Java 8
Change-Id: I06f811fc46a606b719582c0724e8d0c89e823b37
This commit is contained in:
parent
82be8186fe
commit
3931c16bdb
@ -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
|
||||
|
@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
@ -113,7 +113,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.processAnnotations=enabled
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
|
@ -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
|
||||
@ -547,7 +547,7 @@ heap size:
|
||||
|
||||
----
|
||||
cat > .buckjavaargs <<EOF
|
||||
-XX:MaxPermSize=512m -Xms8000m -Xmx16000m
|
||||
-Xms8000m -Xmx16000m
|
||||
EOF
|
||||
----
|
||||
|
||||
|
@ -26,14 +26,14 @@ Most distributions come with Java today. Do you already have Java installed?
|
||||
|
||||
----
|
||||
$ java -version
|
||||
java version "1.7.0_21"
|
||||
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
|
||||
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
|
||||
openjdk version "1.8.0_72"
|
||||
OpenJDK Runtime Environment (build 1.8.0_72-b15)
|
||||
OpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)
|
||||
----
|
||||
|
||||
If Java isn't installed, get it:
|
||||
|
||||
* JDK, minimum version 1.7 http://www.oracle.com/technetwork/java/javase/downloads/index.html[Download]
|
||||
* JDK, minimum version 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html[Download]
|
||||
|
||||
|
||||
[[user]]
|
||||
|
@ -5,7 +5,7 @@
|
||||
To run the Gerrit service, the following requirements must be met on
|
||||
the host:
|
||||
|
||||
* JDK, minimum version 1.7 http://www.oracle.com/technetwork/java/javase/downloads/index.html[Download]
|
||||
* JDK, minimum version 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html[Download]
|
||||
|
||||
You'll also need an SQL database to house the review metadata. You have the
|
||||
choice of either using the embedded H2 or to host your own MySQL or PostgreSQL.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -135,8 +135,4 @@ class InitAuth implements InitStep {
|
||||
libraries.bouncyCastlePGP.downloadRequired();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -54,8 +54,4 @@ class InitCache implements InitStep {
|
||||
Path loc = site.resolve(path);
|
||||
FileUtil.mkdirsOrDie(loc, "cannot create cache.directory");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -117,8 +117,4 @@ class InitContainer implements InitStep {
|
||||
private static String javaHome() {
|
||||
return System.getProperty("java.home");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -102,8 +102,4 @@ class InitDatabase implements InitStep {
|
||||
GerritServerIdProvider.KEY, GerritServerIdProvider.generate());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,4 @@ class InitGitManager implements InitStep {
|
||||
}
|
||||
FileUtil.mkdirsOrDie(d, "Cannot create");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -202,8 +202,4 @@ class InitHttpd implements InitStep {
|
||||
throw die("Cannot delete " + tmpdir, e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -87,8 +87,4 @@ class InitIndex implements InitStep {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -64,8 +64,4 @@ class InitSendEmail implements InitStep {
|
||||
sendemail.string("SMTP username", "smtpUser", username);
|
||||
sendemail.password("smtpUser", "smtpPass");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -163,8 +163,4 @@ class InitSshd implements InitStep {
|
||||
System.err.println(" done");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -286,8 +286,4 @@ class UpgradeFrom2_0_x implements InitStep {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRun() throws Exception {
|
||||
}
|
||||
}
|
||||
|
@ -19,5 +19,5 @@ public interface InitStep {
|
||||
void run() throws Exception;
|
||||
|
||||
/** Executed after the site has been initialized */
|
||||
void postRun() throws Exception;
|
||||
default public void postRun() throws Exception {}
|
||||
}
|
||||
|
@ -4,8 +4,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
@ -85,7 +85,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
|
@ -66,8 +66,8 @@ limitations under the License.
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -4,8 +4,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
@ -85,7 +85,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
|
@ -61,8 +61,8 @@ limitations under the License.
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -4,8 +4,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
@ -85,7 +85,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
|
@ -60,8 +60,8 @@ limitations under the License.
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fc39c552cffb94d15797d02e272fdc543c35b6bd
|
||||
Subproject commit de2d4d7e7222e1f8b286ea13b316f77fae9ee878
|
@ -1 +1 @@
|
||||
Subproject commit 5cac325cca171205130c53df8b3ee9ab3b115979
|
||||
Subproject commit a592cc0cb61ef309f21669c037ee6689780a6d89
|
@ -1 +1 @@
|
||||
Subproject commit 46079ec92478ddc1e9ffd84eae22fb6af788c9fd
|
||||
Subproject commit 982292220c81dadefae9535e9f439ba50e71df7e
|
@ -45,7 +45,7 @@
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
|
||||
@ -156,7 +156,7 @@
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
@ -227,7 +227,7 @@
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
|
||||
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
|
||||
|
@ -28,7 +28,7 @@ GWT = ['//gerrit-gwtui:ui_module']
|
||||
JRE = '/'.join([
|
||||
'org.eclipse.jdt.launching.JRE_CONTAINER',
|
||||
'org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType',
|
||||
'JavaSE-1.7',
|
||||
'JavaSE-1.8',
|
||||
])
|
||||
|
||||
ROOT = path.abspath(__file__)
|
||||
|
@ -10,13 +10,14 @@ def java_doc(
|
||||
):
|
||||
# TODO(davido): Actually we shouldn't need to extract the source
|
||||
# archive, javadoc should just work with provided archive.
|
||||
external_docs.insert(0, 'http://docs.oracle.com/javase/7/docs/api')
|
||||
external_docs.insert(0, 'http://docs.oracle.com/javase/8/docs/api')
|
||||
genrule(
|
||||
name = name,
|
||||
cmd = ' '.join([
|
||||
'mkdir $TMP/sourcepath &&',
|
||||
'unzip $(location %s) -d $TMP/sourcepath &&' % source_jar,
|
||||
'javadoc',
|
||||
'-Xdoclint:-missing',
|
||||
'-quiet',
|
||||
'-protected',
|
||||
'-encoding UTF-8',
|
||||
|
Loading…
Reference in New Issue
Block a user