Merge branch 'stable-3.1'

* stable-3.1:
  Update highlight.js
  Add "Page ..." next to back and forward arrows
  Fix the size of the commit message box
  Bazel: Fix issues flagged by buildifier
  Document that gerrit supports JDK 11
  lib/lucene: merge jars using a java_binary rule

Change-Id: I9807d05de588e8437310ade18e2e5e9c84d2fe27
This commit is contained in:
David Pursehouse 2020-01-10 14:20:23 +09:00
commit a767f08db3
7 changed files with 286 additions and 329 deletions

View File

@ -6,9 +6,9 @@
To run the Gerrit service, the following requirement must be met on the host: To run the Gerrit service, the following requirement must be met on the host:
* JRE, version 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html[Download,role=external,window=_blank] * JRE, versions 1.8 or 11 http://www.oracle.com/technetwork/java/javase/downloads/index.html[Download,role=external,window=_blank]
+ +
Gerrit is not yet compatible with Java 9 or newer at this time. Gerrit is not yet compatible with Java 13 or newer at this time.
[[cryptography]] [[cryptography]]
== Configure Java for Strong Cryptography == Configure Java for Strong Cryptography

View File

@ -76,7 +76,7 @@ Apache2.0
* log:jsonevent-layout * log:jsonevent-layout
* log:log4j * log:log4j
* lucene:lucene-analyzers-common * lucene:lucene-analyzers-common
* lucene:lucene-core-and-backward-codecs * lucene:lucene-core-and-backward-codecs-merged
* lucene:lucene-misc * lucene:lucene-misc
* lucene:lucene-queryparser * lucene:lucene-queryparser
* mime4j:core * mime4j:core

File diff suppressed because one or more lines are too long

View File

@ -1,17 +1,28 @@
load("@rules_java//java:defs.bzl", "java_library") load("@rules_java//java:defs.bzl", "java_binary", "java_import", "java_library")
load("//tools/bzl:maven.bzl", "merge_maven_jars") load("//tools/bzl:maven.bzl", "merge_maven_jars")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
# core and backward-codecs both provide # Merge jars so
# META-INF/services/org.apache.lucene.codecs.Codec, so they must be merged. # META-INF/services/org.apache.lucene.codecs.Codec
merge_maven_jars( # contains the union of both Codec collections.
name = "lucene-core-and-backward-codecs", java_binary(
srcs = [ name = "lucene-core-and-backward-codecs-merged",
data = ["//lib:LICENSE-Apache2.0"],
main_class = "NotImportant",
runtime_deps = [
# in case of conflict, we want the implementation of backwards-codecs
# first.
"@backward-codecs//jar", "@backward-codecs//jar",
"@lucene-core//jar", "@lucene-core//jar",
], ],
data = ["//lib:LICENSE-Apache2.0"], )
java_import(
name = "lucene-core-and-backward-codecs",
jars = [
":lucene-core-and-backward-codecs-merged_deploy.jar",
],
) )
java_library( java_library(

View File

@ -99,7 +99,7 @@ def polygerrit_bundle(name, srcs, outs, app):
"for f in $(locations " + name + "_theme_sources); do cp $$f $$TMP/polygerrit_ui/styles/themes; done", "for f in $(locations " + name + "_theme_sources); do cp $$f $$TMP/polygerrit_ui/styles/themes; done",
"for f in $(locations //lib/js:highlightjs_files); do cp $$f $$TMP/polygerrit_ui/bower_components/highlightjs/ ; done", "for f in $(locations //lib/js:highlightjs_files); do cp $$f $$TMP/polygerrit_ui/bower_components/highlightjs/ ; done",
"unzip -qd $$TMP/polygerrit_ui/bower_components $(location @webcomponentsjs//:zipfile) webcomponentsjs/webcomponents-lite.js", "unzip -qd $$TMP/polygerrit_ui/bower_components $(location @webcomponentsjs//:zipfile) webcomponentsjs/webcomponents-lite.js",
"unzip -qd $$TMP/polygerrit_ui/bower_components $(location @font-roboto-local//:zipfile) font-roboto-local/fonts/\*/\*.ttf", "unzip -qd $$TMP/polygerrit_ui/bower_components $(location @font-roboto-local//:zipfile) font-roboto-local/fonts/\\*/\\*.ttf",
"cd $$TMP", "cd $$TMP",
"find . -exec touch -t 198001010000 '{}' ';'", "find . -exec touch -t 198001010000 '{}' ';'",
"zip -qr $$ROOT/$@ *", "zip -qr $$ROOT/$@ *",

View File

@ -4,17 +4,9 @@ load(
"default_java_toolchain", "default_java_toolchain",
) )
load("@rules_java//java:defs.bzl", "java_package_configuration") load("@rules_java//java:defs.bzl", "java_package_configuration")
load("@rules_python//python:defs.bzl", "py_binary")
exports_files(["nongoogle.bzl"]) exports_files(["nongoogle.bzl"])
py_binary(
name = "merge_jars",
srcs = ["merge_jars.py"],
main = "merge_jars.py",
visibility = ["//visibility:public"],
)
default_java_toolchain( default_java_toolchain(
name = "error_prone_warnings_toolchain", name = "error_prone_warnings_toolchain",
bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"], bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"],

View File

@ -1,49 +0,0 @@
#!/usr/bin/env python
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
import collections
import sys
import zipfile
if len(sys.argv) < 3:
print('usage: %s <out.zip> <in.zip>...' % sys.argv[0], file=sys.stderr)
exit(1)
outfile = sys.argv[1]
infiles = sys.argv[2:]
seen = set()
SERVICES = 'META-INF/services/'
try:
with zipfile.ZipFile(outfile, 'w') as outzip:
services = collections.defaultdict(lambda: '')
for infile in infiles:
with zipfile.ZipFile(infile) as inzip:
for info in inzip.infolist():
n = info.filename
if n in seen:
continue
elif n.startswith(SERVICES):
# Concatenate all provider configuration files.
services[n] += inzip.read(n).decode("UTF-8")
continue
outzip.writestr(info, inzip.read(n))
seen.add(n)
for n, v in list(services.items()):
outzip.writestr(n, v)
except Exception as err:
exit('Failed to merge jars: %s' % err)