Merge branch 'stable-3.0' into stable-3.1
* stable-3.0: Update highlight.js Bazel: Fix issues flagged by buildifier Document that gerrit supports JDK 11 lib/lucene: merge jars using a java_binary rule Change-Id: Ibac37e9cafd7dfbd1e565f9492a90733edd38f26
This commit is contained in:
commit
6b8318d247
@ -5,9 +5,9 @@
|
||||
|
||||
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]
|
||||
* JRE, versions 1.8 or 11 http://www.oracle.com/technetwork/java/javase/downloads/index.html[Download]
|
||||
+
|
||||
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]]
|
||||
== Configure Java for Strong Cryptography
|
||||
|
@ -77,7 +77,7 @@ Apache2.0
|
||||
* log:jsonevent-layout
|
||||
* log:log4j
|
||||
* lucene:lucene-analyzers-common
|
||||
* lucene:lucene-core-and-backward-codecs
|
||||
* lucene:lucene-core-and-backward-codecs-merged
|
||||
* lucene:lucene-misc
|
||||
* lucene:lucene-queryparser
|
||||
* mime4j:core
|
||||
|
525
lib/highlightjs/highlight.min.js
vendored
525
lib/highlightjs/highlight.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
# core and backward-codecs both provide
|
||||
# META-INF/services/org.apache.lucene.codecs.Codec, so they must be merged.
|
||||
merge_maven_jars(
|
||||
name = "lucene-core-and-backward-codecs",
|
||||
srcs = [
|
||||
# Merge jars so
|
||||
# META-INF/services/org.apache.lucene.codecs.Codec
|
||||
# contains the union of both Codec collections.
|
||||
java_binary(
|
||||
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",
|
||||
"@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(
|
||||
|
@ -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 //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 @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",
|
||||
"find . -exec touch -t 198001010000 '{}' ';'",
|
||||
"zip -qr $$ROOT/$@ *",
|
||||
|
@ -4,17 +4,9 @@ load(
|
||||
"default_java_toolchain",
|
||||
)
|
||||
load("@rules_java//java:defs.bzl", "java_package_configuration")
|
||||
load("@rules_python//python:defs.bzl", "py_binary")
|
||||
|
||||
exports_files(["nongoogle.bzl"])
|
||||
|
||||
py_binary(
|
||||
name = "merge_jars",
|
||||
srcs = ["merge_jars.py"],
|
||||
main = "merge_jars.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
default_java_toolchain(
|
||||
name = "error_prone_warnings_toolchain",
|
||||
bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"],
|
||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user