Remove Buck based build
Bug: Issue 5302 Change-Id: I6e860446ef30ff0ad1c7c49fc0e39d39d921820b
This commit is contained in:
parent
b33d052c45
commit
fdbfcad77d
|
@ -11,10 +11,6 @@ directories:
|
||||||
-./.metadata
|
-./.metadata
|
||||||
-./.settings
|
-./.settings
|
||||||
-./.apt_generated
|
-./.apt_generated
|
||||||
# BUCK excludes; Remove after we have entirely switched to Bazel
|
|
||||||
-./.buckd
|
|
||||||
-bucklets
|
|
||||||
-buck-out
|
|
||||||
|
|
||||||
targets:
|
targets:
|
||||||
//...:all
|
//...:all
|
||||||
|
|
37
.buckconfig
37
.buckconfig
|
@ -1,37 +0,0 @@
|
||||||
[alias]
|
|
||||||
api = //:api
|
|
||||||
chrome = //:chrome
|
|
||||||
docs = //Documentation:searchfree
|
|
||||||
firefox = //:firefox
|
|
||||||
gerrit = //:gerrit
|
|
||||||
gwtgerrit = //:gwtgerrit
|
|
||||||
headless = //:headless
|
|
||||||
polygerrit = //:polygerrit
|
|
||||||
release = //:release
|
|
||||||
releasenotes = //ReleaseNotes:html
|
|
||||||
safari = //:safari
|
|
||||||
soyc = //gerrit-gwtui:ui_soyc
|
|
||||||
soyc_r = //gerrit-gwtui:ui_soyc_r
|
|
||||||
withdocs = //:withdocs
|
|
||||||
|
|
||||||
[buildfile]
|
|
||||||
includes = //tools/default.defs
|
|
||||||
|
|
||||||
[java]
|
|
||||||
jar_spool_mode = direct_to_jar
|
|
||||||
safe_annotation_processors = com.google.auto.value.processor.AutoAnnotationProcessor,com.google.auto.value.processor.AutoValueProcessor
|
|
||||||
src_roots = java, resources, src
|
|
||||||
source_level = 8
|
|
||||||
target_level = 8
|
|
||||||
|
|
||||||
[project]
|
|
||||||
allow_symlinks = allow
|
|
||||||
ignore = .git, eclipse-out, bazel-gerrit, bin
|
|
||||||
parallel_parsing = true
|
|
||||||
|
|
||||||
[cache]
|
|
||||||
mode = dir
|
|
||||||
dir = ~/.gerritcodereview/buck-cache/locally-built-artifacts
|
|
||||||
|
|
||||||
[test]
|
|
||||||
excluded_labels = manual
|
|
|
@ -1 +0,0 @@
|
||||||
e27df656657f93f8d57a7aaac69a5ae0e298a292
|
|
|
@ -12,16 +12,11 @@
|
||||||
*.eml
|
*.eml
|
||||||
*.sublime-*
|
*.sublime-*
|
||||||
/gerrit-package-plugins
|
/gerrit-package-plugins
|
||||||
/.buckconfig.local
|
|
||||||
/.buckjavaargs
|
|
||||||
/.buckd
|
|
||||||
/bazel-bin
|
/bazel-bin
|
||||||
/bazel-genfiles
|
/bazel-genfiles
|
||||||
/bazel-gerrit
|
/bazel-gerrit
|
||||||
/bazel-out
|
/bazel-out
|
||||||
/bazel-testlogs
|
/bazel-testlogs
|
||||||
/buck-cache
|
|
||||||
/buck-out
|
|
||||||
/eclipse-out
|
/eclipse-out
|
||||||
/extras
|
/extras
|
||||||
/infer-out
|
/infer-out
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
"ignore_dirs": [
|
|
||||||
"buck-out",
|
|
||||||
"eclipse-out"
|
|
||||||
],
|
|
||||||
"ignore_vcs": [
|
|
||||||
".git"
|
|
||||||
]
|
|
||||||
}
|
|
31
BUCK
31
BUCK
|
@ -1,31 +0,0 @@
|
||||||
include_defs('//tools/build.defs')
|
|
||||||
|
|
||||||
gerrit_war(name = 'gerrit')
|
|
||||||
gerrit_war(name = 'gwtgerrit', ui = 'ui_dbg')
|
|
||||||
gerrit_war(name = 'headless', ui = None)
|
|
||||||
gerrit_war(name = 'chrome', ui = 'ui_chrome')
|
|
||||||
gerrit_war(name = 'firefox', ui = 'ui_firefox')
|
|
||||||
gerrit_war(name = 'safari', ui = 'ui_safari')
|
|
||||||
gerrit_war(name = 'polygerrit', ui = 'polygerrit')
|
|
||||||
gerrit_war(name = 'withdocs', docs = True)
|
|
||||||
gerrit_war(name = 'release', ui = 'ui_optdbg_r', docs = True, context = ['//plugins:core'], visibility = ['//tools/maven:'])
|
|
||||||
|
|
||||||
API_DEPS = [
|
|
||||||
'//gerrit-acceptance-framework:acceptance-framework',
|
|
||||||
'//gerrit-acceptance-framework:acceptance-framework-src',
|
|
||||||
'//gerrit-acceptance-framework:acceptance-framework-javadoc',
|
|
||||||
'//gerrit-extension-api:extension-api',
|
|
||||||
'//gerrit-extension-api:extension-api-src',
|
|
||||||
'//gerrit-extension-api:extension-api-javadoc',
|
|
||||||
'//gerrit-plugin-api:plugin-api',
|
|
||||||
'//gerrit-plugin-api:plugin-api-src',
|
|
||||||
'//gerrit-plugin-api:plugin-api-javadoc',
|
|
||||||
'//gerrit-plugin-gwtui:gwtui-api',
|
|
||||||
'//gerrit-plugin-gwtui:gwtui-api-src',
|
|
||||||
'//gerrit-plugin-gwtui:gwtui-api-javadoc',
|
|
||||||
]
|
|
||||||
|
|
||||||
zip_file(
|
|
||||||
name = 'api',
|
|
||||||
srcs = API_DEPS,
|
|
||||||
)
|
|
|
@ -1,80 +0,0 @@
|
||||||
include_defs('//Documentation/asciidoc.defs')
|
|
||||||
include_defs('//Documentation/config.defs')
|
|
||||||
include_defs('//Documentation/license.defs')
|
|
||||||
include_defs('//tools/git.defs')
|
|
||||||
|
|
||||||
DOC_DIR = 'Documentation'
|
|
||||||
|
|
||||||
JSUI_JAVA_DEPS = ['//gerrit-gwtui:ui_module']
|
|
||||||
JSUI_NON_JAVA_DEPS = ['//polygerrit-ui/app:polygerrit_ui']
|
|
||||||
MAIN_JAVA_DEPS = ['//gerrit-pgm:pgm']
|
|
||||||
SRCS = glob(['*.txt'], excludes = ['licenses.txt'])
|
|
||||||
|
|
||||||
|
|
||||||
genasciidoc(
|
|
||||||
name = 'html',
|
|
||||||
out = 'html.zip',
|
|
||||||
directory = DOC_DIR,
|
|
||||||
srcs = SRCS + [':licenses.txt'],
|
|
||||||
attributes = documentation_attributes(git_describe()),
|
|
||||||
backend = 'html5',
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genasciidoc(
|
|
||||||
name = 'searchfree',
|
|
||||||
out = 'searchfree.zip',
|
|
||||||
directory = DOC_DIR,
|
|
||||||
srcs = SRCS + [':licenses.txt'],
|
|
||||||
attributes = documentation_attributes(git_describe()),
|
|
||||||
backend = 'html5',
|
|
||||||
searchbox = False,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genlicenses(
|
|
||||||
name = 'licenses.txt',
|
|
||||||
opts = ['--asciidoc'],
|
|
||||||
java_deps = JSUI_JAVA_DEPS + MAIN_JAVA_DEPS,
|
|
||||||
non_java_deps = JSUI_NON_JAVA_DEPS,
|
|
||||||
out = 'licenses.txt',
|
|
||||||
)
|
|
||||||
|
|
||||||
# Required by Google for gerrit-review.
|
|
||||||
genlicenses(
|
|
||||||
name = 'js_licenses.txt',
|
|
||||||
opts = ['--partial'],
|
|
||||||
java_deps = JSUI_JAVA_DEPS,
|
|
||||||
non_java_deps = JSUI_NON_JAVA_DEPS,
|
|
||||||
out = 'js_licenses.txt',
|
|
||||||
)
|
|
||||||
|
|
||||||
python_binary(
|
|
||||||
name = 'gen_licenses',
|
|
||||||
main = 'gen_licenses.py',
|
|
||||||
)
|
|
||||||
|
|
||||||
python_binary(
|
|
||||||
name = 'replace_macros',
|
|
||||||
main = 'replace_macros.py',
|
|
||||||
visibility = ['//ReleaseNotes:'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'index',
|
|
||||||
cmd = '$(exe //lib/asciidoctor:doc_indexer) ' +
|
|
||||||
'-o $OUT ' +
|
|
||||||
'--prefix "%s/" ' % DOC_DIR +
|
|
||||||
'--in-ext ".txt" ' +
|
|
||||||
'--out-ext ".html" ' +
|
|
||||||
'$SRCS ' +
|
|
||||||
'$(location :licenses.txt)',
|
|
||||||
srcs = SRCS,
|
|
||||||
out = 'index.jar',
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'index_lib',
|
|
||||||
binary_jar = ':index',
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,113 +0,0 @@
|
||||||
# Copyright (C) 2013 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.
|
|
||||||
|
|
||||||
def genasciidoc_htmlonly(
|
|
||||||
name,
|
|
||||||
out,
|
|
||||||
srcs = [],
|
|
||||||
attributes = [],
|
|
||||||
backend = None,
|
|
||||||
searchbox = True,
|
|
||||||
visibility = []):
|
|
||||||
EXPN = '.' + name + '_expn'
|
|
||||||
|
|
||||||
asciidoc = [
|
|
||||||
'$(exe //lib/asciidoctor:asciidoc)',
|
|
||||||
'-z', '$OUT',
|
|
||||||
'--base-dir', '$SRCDIR',
|
|
||||||
'--tmp', '$TMP',
|
|
||||||
'--in-ext', '".txt%s"' % EXPN,
|
|
||||||
'--out-ext', '".html"',
|
|
||||||
]
|
|
||||||
if backend:
|
|
||||||
asciidoc.extend(['-b', backend])
|
|
||||||
for attribute in attributes:
|
|
||||||
asciidoc.extend(['-a', attribute])
|
|
||||||
asciidoc.append('$SRCS')
|
|
||||||
newsrcs = []
|
|
||||||
for src in srcs:
|
|
||||||
fn = src
|
|
||||||
# We have two cases: regular source files and generated files.
|
|
||||||
# Generated files are passed as targets ':foo', and ':' is removed.
|
|
||||||
# 1. regular files: cmd = '-s foo', srcs = ['foo']
|
|
||||||
# 2. generated files: cmd = '-s $(location :foo)', srcs = []
|
|
||||||
srcs = [src]
|
|
||||||
passed_src = fn
|
|
||||||
if fn.startswith(':') :
|
|
||||||
fn = src[1:]
|
|
||||||
srcs = []
|
|
||||||
passed_src = '$(location :%s)' % fn
|
|
||||||
ex = fn + EXPN
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = ex,
|
|
||||||
cmd = '$(exe //Documentation:replace_macros) --suffix="%s"' % EXPN +
|
|
||||||
' -s ' + passed_src + ' -o $OUT' +
|
|
||||||
(' --searchbox' if searchbox else ' --no-searchbox'),
|
|
||||||
srcs = srcs,
|
|
||||||
out = ex,
|
|
||||||
)
|
|
||||||
|
|
||||||
newsrcs.append(':%s' % ex)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = name,
|
|
||||||
cmd = ' '.join(asciidoc),
|
|
||||||
srcs = newsrcs,
|
|
||||||
out = out,
|
|
||||||
visibility = visibility,
|
|
||||||
)
|
|
||||||
|
|
||||||
def genasciidoc(
|
|
||||||
name,
|
|
||||||
out,
|
|
||||||
directory,
|
|
||||||
srcs = [],
|
|
||||||
attributes = [],
|
|
||||||
backend = None,
|
|
||||||
searchbox = True,
|
|
||||||
resources = True,
|
|
||||||
visibility = []):
|
|
||||||
SUFFIX = '_htmlonly'
|
|
||||||
|
|
||||||
genasciidoc_htmlonly(
|
|
||||||
name = name + SUFFIX if resources else name,
|
|
||||||
srcs = srcs,
|
|
||||||
attributes = attributes,
|
|
||||||
backend = backend,
|
|
||||||
searchbox = searchbox,
|
|
||||||
out = (name + SUFFIX + '.zip') if resources else (name + '.zip'),
|
|
||||||
)
|
|
||||||
|
|
||||||
if resources:
|
|
||||||
genrule(
|
|
||||||
name = name,
|
|
||||||
cmd = 'cd $TMP;' +
|
|
||||||
'mkdir -p %s/images;' % directory +
|
|
||||||
'unzip -q $(location %s) -d %s/;'
|
|
||||||
% (':' + name + SUFFIX, directory) +
|
|
||||||
'for s in $SRCS;do ln -s $s %s/;done;' % directory +
|
|
||||||
'mv %s/*.{jpg,png} %s/images;' % (directory, directory) +
|
|
||||||
'cp $(location %s) LICENSES.txt;' % ':licenses.txt' +
|
|
||||||
'zip -qr $OUT *',
|
|
||||||
srcs = glob([
|
|
||||||
'images/*.jpg',
|
|
||||||
'images/*.png',
|
|
||||||
]) + [
|
|
||||||
'//gerrit-prettify:prettify.min.css',
|
|
||||||
'//gerrit-prettify:prettify.min.js',
|
|
||||||
],
|
|
||||||
out = out,
|
|
||||||
visibility = visibility,
|
|
||||||
)
|
|
|
@ -1,22 +0,0 @@
|
||||||
DOCUMENTATION_DEPS = {
|
|
||||||
"install-quick.txt": ["config-login-register.txt"],
|
|
||||||
"install.txt": ["database-setup.txt"],
|
|
||||||
}
|
|
||||||
|
|
||||||
def documentation_attributes(revision):
|
|
||||||
return [
|
|
||||||
'toc',
|
|
||||||
'newline="\\n"',
|
|
||||||
'asterisk="*"',
|
|
||||||
'plus="+"',
|
|
||||||
'caret="^"',
|
|
||||||
'startsb="["',
|
|
||||||
'endsb="]"',
|
|
||||||
'tilde="~"',
|
|
||||||
'last-update-label!',
|
|
||||||
'source-highlighter=prettify',
|
|
||||||
'stylesheet=DEFAULT',
|
|
||||||
'linkcss=true',
|
|
||||||
'prettifydir=.',
|
|
||||||
'revnumber="%s"' % revision,
|
|
||||||
]
|
|
|
@ -32,6 +32,10 @@ PolyGerrit UI:
|
||||||
bazel build gerrit
|
bazel build gerrit
|
||||||
----
|
----
|
||||||
|
|
||||||
|
[NOTE]
|
||||||
|
PolyGerrit UI may require additional tools (such as npm). Please read
|
||||||
|
the polygerrit-ui/README.md for more info.
|
||||||
|
|
||||||
The output executable WAR will be placed in:
|
The output executable WAR will be placed in:
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
|
@ -1,735 +0,0 @@
|
||||||
= Gerrit Code Review - Building with Buck
|
|
||||||
|
|
||||||
|
|
||||||
== Installation
|
|
||||||
|
|
||||||
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
|
|
||||||
and Mac OS are supported.
|
|
||||||
|
|
||||||
Clone the git and build it:
|
|
||||||
|
|
||||||
----
|
|
||||||
git clone https://github.com/facebook/buck
|
|
||||||
cd buck
|
|
||||||
git checkout $(cat ../gerrit/.buckversion)
|
|
||||||
ant
|
|
||||||
----
|
|
||||||
|
|
||||||
If you don't have a `bin/` directory in your home directory, create one:
|
|
||||||
|
|
||||||
----
|
|
||||||
mkdir ~/bin
|
|
||||||
----
|
|
||||||
|
|
||||||
Add the `~/bin` folder to the path:
|
|
||||||
|
|
||||||
----
|
|
||||||
PATH=~/bin:$PATH
|
|
||||||
----
|
|
||||||
|
|
||||||
Note that the buck executable needs to be available in all shell sessions,
|
|
||||||
so also make sure it is appended to the path globally.
|
|
||||||
|
|
||||||
Add a symbolic link in `~/bin` to the buck and buckd executables:
|
|
||||||
|
|
||||||
----
|
|
||||||
ln -s `pwd`/bin/buck ~/bin/
|
|
||||||
ln -s `pwd`/bin/buckd ~/bin/
|
|
||||||
----
|
|
||||||
|
|
||||||
Verify that `buck` is accessible:
|
|
||||||
|
|
||||||
----
|
|
||||||
which buck
|
|
||||||
----
|
|
||||||
|
|
||||||
To enable autocompletion of buck commands, install the autocompletion
|
|
||||||
script from `./scripts/buck-completion.bash` in the buck project. Refer
|
|
||||||
to the script's header comments for installation instructions.
|
|
||||||
|
|
||||||
== Prerequisites
|
|
||||||
|
|
||||||
Buck requires Python version 2.7 to be installed. The Maven download toolchain
|
|
||||||
requires `curl` to be installed.
|
|
||||||
|
|
||||||
[[eclipse]]
|
|
||||||
== Eclipse Integration
|
|
||||||
|
|
||||||
|
|
||||||
=== Generating the Eclipse Project
|
|
||||||
|
|
||||||
Create the Eclipse project:
|
|
||||||
|
|
||||||
----
|
|
||||||
tools/eclipse/project.py
|
|
||||||
----
|
|
||||||
|
|
||||||
and then follow the link:dev-eclipse.html#setup[setup instructions].
|
|
||||||
|
|
||||||
=== Refreshing the Classpath
|
|
||||||
|
|
||||||
If an updated classpath is needed, the Eclipse project can be
|
|
||||||
refreshed and missing dependency JARs can be downloaded:
|
|
||||||
|
|
||||||
----
|
|
||||||
tools/eclipse/project.py
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
=== Attaching Sources
|
|
||||||
|
|
||||||
Source JARs are downloaded by default. This allows Eclipse to show
|
|
||||||
documentation or dive into the implementation of a library JAR.
|
|
||||||
|
|
||||||
To save time and bandwidth, download of source JARs can be restricted
|
|
||||||
to only those that are necessary to compile Java source into JavaScript
|
|
||||||
using the GWT compiler:
|
|
||||||
|
|
||||||
----
|
|
||||||
tools/eclipse/project.py --no-src
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
[[build]]
|
|
||||||
== Building on the Command Line
|
|
||||||
|
|
||||||
|
|
||||||
=== Gerrit Development WAR File
|
|
||||||
|
|
||||||
To build the Gerrit web application that includes GWT UI and PolyGerrit UI:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build gerrit
|
|
||||||
----
|
|
||||||
|
|
||||||
[NOTE]
|
|
||||||
PolyGerrit UI may require additional tools (such as npm). Please read
|
|
||||||
the polygerrit-ui/README.md for more info.
|
|
||||||
|
|
||||||
The output executable WAR will be placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/gerrit/gerrit.war
|
|
||||||
----
|
|
||||||
|
|
||||||
To build the Gerrit web application that includes only GWT UI:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build gwtgerrit
|
|
||||||
----
|
|
||||||
|
|
||||||
The output executable WAR will be placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/gwtgerrit/gwtgerrit.war
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
=== Headless Mode
|
|
||||||
|
|
||||||
To build Gerrit in headless mode, i.e. without the GWT Web UI:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build headless
|
|
||||||
----
|
|
||||||
|
|
||||||
The output executable WAR will be placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/headless/headless.war
|
|
||||||
----
|
|
||||||
|
|
||||||
=== Extension and Plugin API JAR Files
|
|
||||||
|
|
||||||
To build the extension, plugin and GWT API JAR files:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build api
|
|
||||||
----
|
|
||||||
|
|
||||||
Java binaries, Java sources and Java docs are generated into corresponding
|
|
||||||
project directories in `buck-out/gen`, here as example for plugin API:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/gerrit-plugin-api/plugin-api.jar
|
|
||||||
buck-out/gen/gerrit-plugin-api/plugin-api-javadoc/plugin-api-javadoc.jar
|
|
||||||
buck-out/gen/gerrit-plugin-api/plugin-api-src.jar
|
|
||||||
----
|
|
||||||
|
|
||||||
Install {extension,plugin,gwt}-api to the local maven repository:
|
|
||||||
|
|
||||||
----
|
|
||||||
tools/maven/api.sh install
|
|
||||||
----
|
|
||||||
|
|
||||||
Install gerrit.war to the local maven repository:
|
|
||||||
|
|
||||||
----
|
|
||||||
tools/maven/api.sh war_install
|
|
||||||
----
|
|
||||||
|
|
||||||
=== Plugins
|
|
||||||
|
|
||||||
To build all core plugins:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build plugins:core
|
|
||||||
----
|
|
||||||
|
|
||||||
The output JAR files for individual plugins will be placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/plugins/<name>/<name>.jar
|
|
||||||
----
|
|
||||||
|
|
||||||
The JAR files will also be packaged in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/plugins/core/core.zip
|
|
||||||
----
|
|
||||||
|
|
||||||
To build a specific plugin:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build plugins/<name>:<name>
|
|
||||||
----
|
|
||||||
|
|
||||||
The output JAR file will be be placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/plugins/<name>/<name>.jar
|
|
||||||
----
|
|
||||||
|
|
||||||
Note that when building an individual plugin, the `core.zip` package
|
|
||||||
is not regenerated.
|
|
||||||
|
|
||||||
Additional plugins with BUCK files can be added to the build
|
|
||||||
environment by cloning the source repository into the plugins
|
|
||||||
subdirectory:
|
|
||||||
|
|
||||||
----
|
|
||||||
git clone https://gerrit.googlesource.com/plugins/<name> plugins/<name>
|
|
||||||
echo /plugins/<name> >>.git/info/exclude
|
|
||||||
----
|
|
||||||
|
|
||||||
Additional plugin sources will be automatically added to Eclipse the
|
|
||||||
next time project.py is run:
|
|
||||||
|
|
||||||
----
|
|
||||||
tools/eclipse/project.py
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
[[documentation]]
|
|
||||||
=== Documentation
|
|
||||||
|
|
||||||
To build only the documentation for testing or static hosting:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build docs
|
|
||||||
----
|
|
||||||
|
|
||||||
The generated html files will NOT come with the search box, and will be
|
|
||||||
placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/Documentation/searchfree__tmp/Documentation
|
|
||||||
----
|
|
||||||
|
|
||||||
The html files will also be bundled into `searchfree.zip` in this location:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/Documentation/searchfree/searchfree.zip
|
|
||||||
----
|
|
||||||
|
|
||||||
To build the executable WAR with the documentation included:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build withdocs
|
|
||||||
----
|
|
||||||
|
|
||||||
The WAR file will be placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/withdocs/withdocs.war
|
|
||||||
----
|
|
||||||
|
|
||||||
[[soyc]]
|
|
||||||
=== GWT Compile Report
|
|
||||||
|
|
||||||
The GWT compiler can output a compile report (or "story of your compile"),
|
|
||||||
describing the size of the JavaScript and which source classes contributed
|
|
||||||
to the overall download size.
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build soyc
|
|
||||||
----
|
|
||||||
|
|
||||||
The report will be written as an HTML page to the extras directory, and
|
|
||||||
can be opened and viewed in any web browser:
|
|
||||||
|
|
||||||
----
|
|
||||||
extras/gerrit_ui/soycReport/compile-report/index.html
|
|
||||||
----
|
|
||||||
|
|
||||||
Only the "Split Point Report" is created, "Compiler Metrics" are not output.
|
|
||||||
|
|
||||||
[[release]]
|
|
||||||
=== Gerrit Release WAR File
|
|
||||||
|
|
||||||
To build the release of the Gerrit web application, including documentation and
|
|
||||||
all core plugins:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck build release
|
|
||||||
----
|
|
||||||
|
|
||||||
The output release WAR will be placed in:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck-out/gen/release/release.war
|
|
||||||
----
|
|
||||||
|
|
||||||
[[tests]]
|
|
||||||
== Running Unit Tests
|
|
||||||
|
|
||||||
To run all tests including acceptance tests (but not flaky tests):
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test --exclude flaky
|
|
||||||
----
|
|
||||||
|
|
||||||
To exclude flaky and slow tests:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test --exclude flaky slow
|
|
||||||
----
|
|
||||||
|
|
||||||
To run only a specific group of acceptance tests:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test --include api
|
|
||||||
----
|
|
||||||
|
|
||||||
The following groups of tests are currently supported:
|
|
||||||
|
|
||||||
* acceptance
|
|
||||||
* api
|
|
||||||
* edit
|
|
||||||
* flaky
|
|
||||||
* git
|
|
||||||
* pgm
|
|
||||||
* rest
|
|
||||||
* server
|
|
||||||
* ssh
|
|
||||||
* slow
|
|
||||||
|
|
||||||
To run a specific test group, e.g. the rest-account test group:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test //gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/account:rest-account
|
|
||||||
----
|
|
||||||
|
|
||||||
To create test coverage report:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test --code-coverage --code-coverage-format html --no-results-cache
|
|
||||||
----
|
|
||||||
|
|
||||||
The HTML report is created in `buck-out/gen/jacoco/code-coverage/index.html`.
|
|
||||||
|
|
||||||
To run the tests against NoteDb backend:
|
|
||||||
|
|
||||||
----
|
|
||||||
GERRIT_NOTEDB=READ_WRITE buck test
|
|
||||||
----
|
|
||||||
|
|
||||||
To run only tests that do not use SSH:
|
|
||||||
|
|
||||||
----
|
|
||||||
GERRIT_USE_SSH=NO buck test
|
|
||||||
----
|
|
||||||
|
|
||||||
== Dependencies
|
|
||||||
|
|
||||||
Dependency JARs are normally downloaded automatically, but Buck can inspect
|
|
||||||
its graph and download any missing JAR files. This is useful to enable
|
|
||||||
subsequent builds to run without network access:
|
|
||||||
|
|
||||||
----
|
|
||||||
tools/download_all.py
|
|
||||||
----
|
|
||||||
|
|
||||||
When downloading from behind a proxy (which is common in some corporate
|
|
||||||
environments), it might be necessary to explicitly specify the proxy that
|
|
||||||
is then used by `curl`:
|
|
||||||
|
|
||||||
----
|
|
||||||
export http_proxy=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
|
|
||||||
----
|
|
||||||
|
|
||||||
Redirection to local mirrors of Maven Central and the Gerrit storage
|
|
||||||
bucket is supported by defining specific properties in
|
|
||||||
`local.properties`, a file that is not tracked by Git:
|
|
||||||
|
|
||||||
----
|
|
||||||
echo download.GERRIT = http://nexus.my-company.com/ >>local.properties
|
|
||||||
echo download.MAVEN_CENTRAL = http://nexus.my-company.com/ >>local.properties
|
|
||||||
----
|
|
||||||
|
|
||||||
The `local.properties` file may be placed in the root of the gerrit repository
|
|
||||||
being built, or in `~/.gerritcodereview/`. The file in the root of the gerrit
|
|
||||||
repository has precedence.
|
|
||||||
|
|
||||||
== Building against unpublished Maven JARs
|
|
||||||
|
|
||||||
To build against unpublished Maven JARs, like gwtorm or PrologCafe, the custom
|
|
||||||
JARs must be installed in the local Maven repository (`mvn clean install`) and
|
|
||||||
`maven_jar()` must be updated to point to the `MAVEN_LOCAL` Maven repository for
|
|
||||||
that artifact:
|
|
||||||
|
|
||||||
[source,python]
|
|
||||||
----
|
|
||||||
maven_jar(
|
|
||||||
name = 'gwtorm',
|
|
||||||
id = 'gwtorm:gwtorm:42',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
repository = MAVEN_LOCAL,
|
|
||||||
)
|
|
||||||
----
|
|
||||||
|
|
||||||
== Building against artifacts from custom Maven repositories
|
|
||||||
|
|
||||||
To build against custom Maven repositories, two modes of operations are
|
|
||||||
supported: with rewrite in local.properties and without.
|
|
||||||
|
|
||||||
Without rewrite the URL of custom Maven repository can be directly passed
|
|
||||||
to the maven_jar() function:
|
|
||||||
|
|
||||||
[source,python]
|
|
||||||
----
|
|
||||||
GERRIT_FORGE = 'http://gerritforge.com/snapshot'
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'gitblit',
|
|
||||||
id = 'com.gitblit:gitblit:1.4.0',
|
|
||||||
sha1 = '1b130dbf5578ace37507430a4a523f6594bf34fa',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
repository = GERRIT_FORGE,
|
|
||||||
)
|
|
||||||
----
|
|
||||||
|
|
||||||
When the custom URL has to be rewritten, then the same logic as with Gerrit
|
|
||||||
known Maven repository is used: Repo name must be defined that matches an entry
|
|
||||||
in local.properties file:
|
|
||||||
|
|
||||||
----
|
|
||||||
download.GERRIT_FORGE = http://my.company.mirror/gerrit-forge
|
|
||||||
----
|
|
||||||
|
|
||||||
And corresponding BUCK excerpt:
|
|
||||||
|
|
||||||
[source,python]
|
|
||||||
----
|
|
||||||
GERRIT_FORGE = 'GERRIT_FORGE:'
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'gitblit',
|
|
||||||
id = 'com.gitblit:gitblit:1.4.0',
|
|
||||||
sha1 = '1b130dbf5578ace37507430a4a523f6594bf34fa',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
repository = GERRIT_FORGE,
|
|
||||||
)
|
|
||||||
----
|
|
||||||
|
|
||||||
=== Caching Build Results
|
|
||||||
|
|
||||||
Build results can be locally cached, saving rebuild time when
|
|
||||||
switching between Git branches. Buck's documentation covers
|
|
||||||
caching in link:http://facebook.github.io/buck/concept/buckconfig.html[buckconfig].
|
|
||||||
The trivial case using a local directory is:
|
|
||||||
|
|
||||||
----
|
|
||||||
cat >.buckconfig.local <<EOF
|
|
||||||
[cache]
|
|
||||||
mode = dir
|
|
||||||
dir = buck-cache
|
|
||||||
EOF
|
|
||||||
----
|
|
||||||
|
|
||||||
[[clean-cache]]
|
|
||||||
=== Cleaning The Buck Cache
|
|
||||||
|
|
||||||
The cache for the Gerrit Code Review project is located in
|
|
||||||
`~/.gerritcodereview/buck-cache/locally-built-artifacts`.
|
|
||||||
|
|
||||||
The Buck cache should never need to be manually deleted. If you find yourself
|
|
||||||
deleting the Buck cache regularly, then it is likely that there is something
|
|
||||||
wrong with your environment or your workflow.
|
|
||||||
|
|
||||||
If you really do need to clean the cache manually, then:
|
|
||||||
|
|
||||||
----
|
|
||||||
rm -rf ~/.gerritcodereview/buck-cache/locally-built-artifacts
|
|
||||||
----
|
|
||||||
|
|
||||||
Note that the root `buck-cache` folder should not be deleted as it also contains
|
|
||||||
the `downloaded-artifacts` directory, which holds the artifacts that got
|
|
||||||
downloaded (not built locally).
|
|
||||||
|
|
||||||
[[buck-daemon]]
|
|
||||||
=== Using Buck daemon
|
|
||||||
|
|
||||||
Buck ships with a daemon command `buckd`, which uses the
|
|
||||||
link:https://github.com/martylamb/nailgun[Nailgun] protocol for running
|
|
||||||
Java programs from the command line without incurring the JVM startup
|
|
||||||
overhead.
|
|
||||||
|
|
||||||
Using a Buck daemon can save significant amounts of time as it avoids the
|
|
||||||
overhead of starting a Java virtual machine, loading the buck class files
|
|
||||||
and parsing the build files for each command.
|
|
||||||
|
|
||||||
It is safe to run several buck daemons started from different project
|
|
||||||
directories and they will not interfere with each other. Buck's documentation
|
|
||||||
covers daemon in http://facebook.github.io/buck/command/buckd.html[buckd].
|
|
||||||
|
|
||||||
To use `buckd` the additional
|
|
||||||
link:https://facebook.github.io/watchman[watchman] program must be installed.
|
|
||||||
|
|
||||||
To disable `buckd`, the environment variable `NO_BUCKD` must be set. It's not
|
|
||||||
recommended to put it in the shell config, as it can be forgotten about it and
|
|
||||||
then assumed Buck was working as it should when it should be using buckd.
|
|
||||||
Prepend the variable to Buck invocation instead:
|
|
||||||
|
|
||||||
----
|
|
||||||
NO_BUCKD=1 buck build gerrit
|
|
||||||
----
|
|
||||||
|
|
||||||
[[watchman]]
|
|
||||||
=== Installing watchman
|
|
||||||
|
|
||||||
Watchman is used internally by Buck to monitor directory trees and is needed
|
|
||||||
for buck daemon to work properly. Because buckd is activated by default in the
|
|
||||||
latest version of Buck, it searches for the watchman executable in the
|
|
||||||
path and issues a warning when it is not found and kills buckd.
|
|
||||||
|
|
||||||
To prepare watchman installation on Linux:
|
|
||||||
|
|
||||||
----
|
|
||||||
git clone https://github.com/facebook/watchman.git
|
|
||||||
cd watchman
|
|
||||||
./autogen.sh
|
|
||||||
----
|
|
||||||
|
|
||||||
To install it in user home directory (without root privileges):
|
|
||||||
|
|
||||||
----
|
|
||||||
./configure --prefix $HOME/watchman
|
|
||||||
make install
|
|
||||||
----
|
|
||||||
|
|
||||||
To install it system wide:
|
|
||||||
|
|
||||||
----
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
----
|
|
||||||
|
|
||||||
Put $HOME/watchman/bin/watchman in path or link to $HOME/bin/watchman.
|
|
||||||
|
|
||||||
To install watchman on OS X:
|
|
||||||
|
|
||||||
----
|
|
||||||
brew install --HEAD watchman
|
|
||||||
----
|
|
||||||
|
|
||||||
See the original documentation for more information:
|
|
||||||
link:https://facebook.github.io/watchman/docs/install.html[Watchman
|
|
||||||
installation].
|
|
||||||
|
|
||||||
=== Override Buck's settings
|
|
||||||
|
|
||||||
Additional JVM args for Buck can be set in `.buckjavaargs` in the
|
|
||||||
project root directory. For example to override Buck's default 1GB
|
|
||||||
heap size:
|
|
||||||
|
|
||||||
----
|
|
||||||
cat > .buckjavaargs <<EOF
|
|
||||||
-Xms8000m -Xmx16000m
|
|
||||||
EOF
|
|
||||||
----
|
|
||||||
|
|
||||||
== Rerun unit tests
|
|
||||||
|
|
||||||
Test execution results are cached by Buck. If a test that was already run
|
|
||||||
needs to be repeated, the unit test cache for that test must be removed first:
|
|
||||||
|
|
||||||
----
|
|
||||||
rm -rf buck-out/bin/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/account/.rest-account/
|
|
||||||
----
|
|
||||||
|
|
||||||
After clearing the cache, the test can be run again:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test //gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/account:rest-account
|
|
||||||
[-] TESTING...FINISHED 12,3s (12 PASS/0 FAIL)
|
|
||||||
RESULTS FOR //gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/account:rest-account
|
|
||||||
PASS 970ms 2 Passed 0 Skipped 0 Failed com.google.gerrit.acceptance.rest.account.CapabilitiesIT
|
|
||||||
PASS 999ms 1 Passed 0 Skipped 0 Failed com.google.gerrit.acceptance.rest.account.EditPreferencesIT
|
|
||||||
PASS 1,2s 1 Passed 0 Skipped 0 Failed com.google.gerrit.acceptance.rest.account.GetAccountDetailIT
|
|
||||||
PASS 951ms 2 Passed 0 Skipped 0 Failed com.google.gerrit.acceptance.rest.account.GetAccountIT
|
|
||||||
PASS 6,4s 2 Passed 0 Skipped 0 Failed com.google.gerrit.acceptance.rest.account.GetDiffPreferencesIT
|
|
||||||
PASS 1,2s 4 Passed 0 Skipped 0 Failed com.google.gerrit.acceptance.rest.account.PutUsernameIT
|
|
||||||
TESTS PASSED
|
|
||||||
----
|
|
||||||
|
|
||||||
An alternative approach is to use Buck's `--filters` (`-f`) option:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test -f 'com.google.gerrit.acceptance.rest.account.CapabilitiesIT'
|
|
||||||
Using buckd.
|
|
||||||
[-] PROCESSING BUCK FILES...FINISHED 1,0s [100%]
|
|
||||||
[-] BUILDING...FINISHED 2,8s [100%] (334/701 JOBS, 110 UPDATED, 5,1% CACHE MISS)
|
|
||||||
[-] TESTING...FINISHED 9,2s (6 PASS/0 FAIL)
|
|
||||||
RESULTS FOR SELECTED TESTS
|
|
||||||
PASS 8,0s 2 Passed 0 Skipped 0 Failed com.google.gerrit.acceptance.rest.account.CapabilitiesIT
|
|
||||||
PASS <100ms 4 Passed 0 Skipped 0 Failed //tools:util_test
|
|
||||||
TESTS PASSED
|
|
||||||
----
|
|
||||||
|
|
||||||
When this option is used, the cache is disabled per design and doesn't need to
|
|
||||||
be explicitly deleted. Note, that this is a known issue, that python tests are
|
|
||||||
always executed.
|
|
||||||
|
|
||||||
Note that when this option is used, the whole unit test cache is dropped, so
|
|
||||||
repeating the
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test
|
|
||||||
----
|
|
||||||
|
|
||||||
causes all tests to be executed again.
|
|
||||||
|
|
||||||
To run tests without using cached results at all, use the `--no-results-cache`
|
|
||||||
option:
|
|
||||||
|
|
||||||
----
|
|
||||||
buck test --no-results-cache
|
|
||||||
----
|
|
||||||
|
|
||||||
== Cross-compiling Java8 to Java7
|
|
||||||
|
|
||||||
After switching to Java8, we should take care to not end up
|
|
||||||
with Java8 code in stable branches. We assume that we don't
|
|
||||||
really want to switch java versions locally every time we switch
|
|
||||||
branches.
|
|
||||||
|
|
||||||
Given that source level on 'stable-2.13' is 7, source level incompatibility
|
|
||||||
will be already correctly detected, so that Java8 compiler would refuse
|
|
||||||
to compile lambdas with -source 7 argument. However, unless bootclasspath
|
|
||||||
is adjusted to point to Java7 runtime, it's possible to end up with broken
|
|
||||||
code, that would compile with Java8 but will not run on Java7 runtime.
|
|
||||||
|
|
||||||
To prevent this, add this line to your '.buckconfig.local' in the Gerrit
|
|
||||||
source root directory when working on stable branches:
|
|
||||||
|
|
||||||
----
|
|
||||||
[java]
|
|
||||||
extra_arguments = -Xbootclasspath/p:/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/lib/rt.jar
|
|
||||||
----
|
|
||||||
|
|
||||||
With this in place, methods that were added only in Java8 in runtime library,
|
|
||||||
would be correctly refused to compile by Java8:
|
|
||||||
|
|
||||||
----
|
|
||||||
$ java -version
|
|
||||||
openjdk version "1.8.0_101"
|
|
||||||
|
|
||||||
$ buck build gerrit-server:server
|
|
||||||
/home/davido/projects/gerrit/gerrit-server/src/main/java/com/google/gerrit/server/project/ProjectCacheImpl.java:218: error: cannot find symbol
|
|
||||||
return Collections.emptySortedSet();
|
|
||||||
^
|
|
||||||
symbol: method emptySortedSet()
|
|
||||||
location: class java.util.Collections
|
|
||||||
----
|
|
||||||
|
|
||||||
== Upgrading Buck
|
|
||||||
|
|
||||||
The following tests should be executed, when Buck version is upgraded:
|
|
||||||
|
|
||||||
* buck build release
|
|
||||||
* tools/maven/api.sh install
|
|
||||||
* buck test
|
|
||||||
* buck build gerrit, change some sources in gerrit-server project,
|
|
||||||
repeat buck build gerrit and verify that gerrit.war was updated
|
|
||||||
* install and verify new gerrit site
|
|
||||||
* upgrade and verify existing gerrit site
|
|
||||||
* reindex existing gerrit site
|
|
||||||
* verify that tools/eclipse/project.py produces sane Eclipse project
|
|
||||||
* verify that tools/eclipse/project.py --src generates sources as well
|
|
||||||
* verify that unit test execution from Eclipse works
|
|
||||||
* verify that daemon started from Eclipse works
|
|
||||||
* verify that GWT SDM debug session started from Eclipse works
|
|
||||||
|
|
||||||
== Known issues and bugs
|
|
||||||
|
|
||||||
=== Symbolic links and `watchman`
|
|
||||||
|
|
||||||
`Buck` with activated `Watchman` has currently a
|
|
||||||
[known bug](https://github.com/facebook/buck/issues/341) related to
|
|
||||||
symbolic links. The symbolic links are used very often with external
|
|
||||||
plugins, that are linked per symbolic link to the plugins directory.
|
|
||||||
With this use case Buck is failing to rebuild the plugin artifact
|
|
||||||
after it was built. All attempts to convince Buck to rebuild will fail.
|
|
||||||
The only known way to recover is to weep out `buck-out` directory. The
|
|
||||||
better workaround is to avoid using Watchman in this specific use case.
|
|
||||||
Watchman can either be de-installed or disabled. See
|
|
||||||
link:#buck-daemon[Using Buck daemon] section above how to temporarily
|
|
||||||
disable `buckd`.
|
|
||||||
|
|
||||||
== Error Prone integration
|
|
||||||
|
|
||||||
link:http://errorprone.info[Error Prone] is a static analysis tool for
|
|
||||||
Java that catches common programming mistakes at compile-time. It can
|
|
||||||
be permanenty or instantly activated. For permanent activation, add these
|
|
||||||
lines to your `.buckconfig.local` file in gerrit tree:
|
|
||||||
|
|
||||||
```
|
|
||||||
[sanitizers]
|
|
||||||
error_prone = 1
|
|
||||||
```
|
|
||||||
|
|
||||||
For instant activation, pass this config option to the `build` or `test`
|
|
||||||
commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
buck build --config sanitizers.error_prone=1 gerrit
|
|
||||||
```
|
|
||||||
|
|
||||||
== Troubleshooting Buck
|
|
||||||
|
|
||||||
In some cases problems with Buck itself need to be investigated. See for example
|
|
||||||
link:https://gerrit-review.googlesource.com/62411[this attempt to upgrade Buck]
|
|
||||||
and link:https://github.com/facebook/buck/pull/227[the fix that was needed] to
|
|
||||||
make the update possible.
|
|
||||||
|
|
||||||
To build Gerrit with a custom version of Buck, the following steps are necessary:
|
|
||||||
|
|
||||||
1. In the Buck git apply any necessary changes from pull requests
|
|
||||||
2. Compile Buck with `ant`
|
|
||||||
3. In the root of the Gerrit project create a `.nobuckcheck` file to prevent Buck
|
|
||||||
from updating itself
|
|
||||||
4. Replace the sha1 in Gerrit's `.buckversion` file with the required version from
|
|
||||||
the custom Buck build
|
|
||||||
5. Build Gerrit as usual
|
|
||||||
|
|
||||||
GERRIT
|
|
||||||
------
|
|
||||||
Part of link:index.html[Gerrit Code Review]
|
|
||||||
|
|
||||||
SEARCHBOX
|
|
||||||
---------
|
|
|
@ -4,15 +4,15 @@
|
||||||
From build process perspective there are three types of plugins:
|
From build process perspective there are three types of plugins:
|
||||||
|
|
||||||
* Maven driven
|
* Maven driven
|
||||||
* Buck in tree driven
|
* Bazel tree driven
|
||||||
* Buck standalone driven
|
* Bazel standalone
|
||||||
|
|
||||||
These types can be combined: if both files in plugin's root directory exist:
|
These types can be combined: if both files in plugin's root directory exist:
|
||||||
|
|
||||||
* `BUCK`
|
* `BUILD`
|
||||||
* `pom.xml`
|
* `pom.xml`
|
||||||
|
|
||||||
the plugin can be built with both Buck and Maven.
|
the plugin can be built with both Bazel and Maven.
|
||||||
|
|
||||||
|
|
||||||
== Maven driven build
|
== Maven driven build
|
||||||
|
@ -52,35 +52,35 @@ mvn install
|
||||||
Repeat step 1. above.
|
Repeat step 1. above.
|
||||||
|
|
||||||
|
|
||||||
== Buck in tree driven
|
== Bazel in tree driven
|
||||||
|
|
||||||
|
|
||||||
The fact that plugin contains `BUCK` file doesn't mean that building this
|
The fact that plugin contains `BUILD` file doesn't mean that building this
|
||||||
plugin from the plugin directory works. For now it doesn't. Buck in tree driven
|
plugin from the plugin directory works. For now it doesn't. Bazel in tree driven
|
||||||
means it can only be built from within Gerrit tree. Clone or link the plugin
|
means it can only be built from within Gerrit tree. Clone or link the plugin
|
||||||
into gerrit/plugins directory:
|
into gerrit/plugins directory:
|
||||||
|
|
||||||
----
|
----
|
||||||
cd gerrit
|
cd gerrit
|
||||||
buck build plugins/<plugin-name>:<plugin-name>
|
bazel build plugins/<plugin-name>:<plugin-name>
|
||||||
----
|
----
|
||||||
|
|
||||||
The output can be normally found in the following directory:
|
The output can be normally found in the following directory:
|
||||||
|
|
||||||
----
|
----
|
||||||
buck-out/gen/plugins/<plugin-name>/<plugin-name>.jar
|
bazel-genfiles/plugins/<plugin-name>/<plugin-name>.jar
|
||||||
----
|
----
|
||||||
|
|
||||||
Some plugins describe their build process in `src/main/resources/Documentation/build.md`
|
Some plugins describe their build process in `src/main/resources/Documentation/build.md`
|
||||||
file. It may worth checking.
|
file. It may worth checking.
|
||||||
|
|
||||||
== Buck standalone driven
|
== Bazel standalone driven
|
||||||
|
|
||||||
Only few plugins support that mode for now:
|
Only few plugins support that mode for now:
|
||||||
|
|
||||||
----
|
----
|
||||||
cd reviewers
|
cd reviewers
|
||||||
buck build plugin
|
bazel build reviewers
|
||||||
----
|
----
|
||||||
|
|
||||||
GERRIT
|
GERRIT
|
||||||
|
|
|
@ -33,7 +33,7 @@ and
|
||||||
In Eclipse, choose 'Import existing project' and select the `gerrit` project
|
In Eclipse, choose 'Import existing project' and select the `gerrit` project
|
||||||
from the current working directory.
|
from the current working directory.
|
||||||
|
|
||||||
Expand the `gerrit` project, right-click on the `buck-out` folder, select
|
Expand the `gerrit` project, right-click on the `eclipse-out` folder, select
|
||||||
'Properties', and then under 'Attributes' check 'Derived'.
|
'Properties', and then under 'Attributes' check 'Derived'.
|
||||||
|
|
||||||
Note that if you make any changes in the project configuration
|
Note that if you make any changes in the project configuration
|
||||||
|
@ -55,7 +55,7 @@ settings prefer when formatting source code.
|
||||||
== Site Initialization
|
== Site Initialization
|
||||||
|
|
||||||
Build once on the command line with
|
Build once on the command line with
|
||||||
link:dev-buck.html#build[Buck] and then follow
|
link:dev-bazel.html#build[Bazel] and then follow
|
||||||
link:dev-readme.html#init[Site Initialization] in the
|
link:dev-readme.html#init[Site Initialization] in the
|
||||||
Developer Setup guide to configure a local site for testing.
|
Developer Setup guide to configure a local site for testing.
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ file:
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
----
|
----
|
||||||
|
|
||||||
For Buck driven plugins, the following line must be included in the BUCK
|
For Bazel driven plugins, the following line must be included in the BUILD
|
||||||
configuration file:
|
configuration file:
|
||||||
|
|
||||||
[source,python]
|
[source,python]
|
||||||
|
@ -1347,7 +1347,7 @@ plugins:
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
----
|
----
|
||||||
|
|
||||||
or in the `BUCK` configuration file for Buck driven plugins:
|
or in the `BUILD` configuration file for Bazel driven plugins:
|
||||||
|
|
||||||
[source,python]
|
[source,python]
|
||||||
----
|
----
|
||||||
|
@ -1412,7 +1412,7 @@ driven plugins:
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
----
|
----
|
||||||
|
|
||||||
or in the `BUCK` configuration file for Buck driven plugins
|
or in the `BUILD` configuration file for Bazel driven plugins
|
||||||
|
|
||||||
[source,python]
|
[source,python]
|
||||||
----
|
----
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
= Gerrit Code Review - Developer Setup
|
= Gerrit Code Review - Developer Setup
|
||||||
|
|
||||||
Bazel or Facebook Buck is needed to compile the code, and an SQL database to
|
Google Bazel is needed to compile the code, and an SQL database to
|
||||||
house the review metadata. H2 is recommended for development
|
house the review metadata. H2 is recommended for development
|
||||||
databases, as it requires no external server process.
|
databases, as it requires no external server process.
|
||||||
|
|
||||||
|
@ -21,9 +21,7 @@ cloned.
|
||||||
[[compile_project]]
|
[[compile_project]]
|
||||||
== Compiling
|
== Compiling
|
||||||
|
|
||||||
Please refer to either <<dev-buck#,Building with Buck>> or
|
Please refer to <<dev-bazel#,Building with Bazel>>.
|
||||||
<<dev-bazel#,Building with Bazel>>.
|
|
||||||
|
|
||||||
|
|
||||||
== Switching between branches
|
== Switching between branches
|
||||||
|
|
||||||
|
@ -50,32 +48,12 @@ screw up your project.
|
||||||
To use the Eclipse IDE for development, please see
|
To use the Eclipse IDE for development, please see
|
||||||
link:dev-eclipse.html[Eclipse Setup].
|
link:dev-eclipse.html[Eclipse Setup].
|
||||||
|
|
||||||
For details on how to configure the Eclipse workspace with Buck,
|
For details on how to configure the Eclipse workspace with Bazel,
|
||||||
refer to: link:dev-buck.html#eclipse[Eclipse integration with Buck].
|
refer to: link:dev-bazel.html#eclipse[Eclipse integration with Bazel].
|
||||||
|
|
||||||
|
|
||||||
== Configuring IntelliJ IDEA
|
== Configuring IntelliJ IDEA
|
||||||
|
|
||||||
=== Build based on Buck
|
|
||||||
|
|
||||||
To use IntelliJ IDEA for development, the easiest way is to follow
|
|
||||||
Eclipse integration and then open it as Eclipse project in IDEA.
|
|
||||||
You need the Eclipse plugin activated in IntelliJ IDEA.
|
|
||||||
|
|
||||||
Once you start compiling using both buck and your Gerrit project in
|
|
||||||
IDEA, you will likely need to mark the below directories as generated
|
|
||||||
sources roots. You can do so using the IDEA "Project" view. In the
|
|
||||||
context menu of each one of these, use "Mark Directory As" to mark
|
|
||||||
them as "Generated Sources Root":
|
|
||||||
|
|
||||||
----
|
|
||||||
__auto_value_tests_gen__
|
|
||||||
__httpd_gen__
|
|
||||||
__server_gen__
|
|
||||||
----
|
|
||||||
|
|
||||||
=== Build based on Bazel
|
|
||||||
|
|
||||||
Please refer to <<dev-intellij#,IntelliJ Setup>> for detailed
|
Please refer to <<dev-intellij#,IntelliJ Setup>> for detailed
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
|
@ -97,12 +75,6 @@ the terminal.
|
||||||
After compiling <<compile_project,(above)>>, run Gerrit's 'init' command to
|
After compiling <<compile_project,(above)>>, run Gerrit's 'init' command to
|
||||||
create a testing site for development use:
|
create a testing site for development use:
|
||||||
|
|
||||||
.Build based on Buck
|
|
||||||
----
|
|
||||||
java -jar buck-out/gen/gerrit/gerrit.war init -d ../gerrit_testsite
|
|
||||||
----
|
|
||||||
|
|
||||||
.Build based on Bazel
|
|
||||||
----
|
----
|
||||||
$(bazel info output_base)/external/local_jdk/bin/java \
|
$(bazel info output_base)/external/local_jdk/bin/java \
|
||||||
-jar bazel-bin/gerrit.war init -d ../gerrit_testsite
|
-jar bazel-bin/gerrit.war init -d ../gerrit_testsite
|
||||||
|
@ -169,10 +141,8 @@ A new review site is created for each test and the Gerrit daemon is
|
||||||
started on that site. When the test has finished the Gerrit daemon is
|
started on that site. When the test has finished the Gerrit daemon is
|
||||||
shutdown.
|
shutdown.
|
||||||
|
|
||||||
For instructions on running the integration tests with Buck,
|
For instructions on running the integration tests with Bazel,
|
||||||
please refer to:
|
please refer to: <<dev-bazel#tests,Running Unit Tests with Bazel>>.
|
||||||
link:dev-buck.html#tests[Running integration tests with Buck].
|
|
||||||
For Bazel, please refer to <<dev-bazel#tests,Running Unit Tests with Bazel>>.
|
|
||||||
|
|
||||||
[[run_daemon]]
|
[[run_daemon]]
|
||||||
=== Running the Daemon
|
=== Running the Daemon
|
||||||
|
@ -180,14 +150,6 @@ For Bazel, please refer to <<dev-bazel#tests,Running Unit Tests with Bazel>>.
|
||||||
The daemon can be directly launched from the build area, without
|
The daemon can be directly launched from the build area, without
|
||||||
copying to the test site:
|
copying to the test site:
|
||||||
|
|
||||||
.Build based on Buck
|
|
||||||
----
|
|
||||||
java -jar buck-out/gen/gerrit/gerrit.war daemon -d \
|
|
||||||
../gerrit_testsite --console-log
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
.Build based on Bazel
|
|
||||||
----
|
----
|
||||||
$(bazel info output_base)/external/local_jdk/bin/java \
|
$(bazel info output_base)/external/local_jdk/bin/java \
|
||||||
-jar bazel-bin/gerrit.war daemon -d ../gerrit_testsite \
|
-jar bazel-bin/gerrit.war daemon -d ../gerrit_testsite \
|
||||||
|
@ -213,12 +175,6 @@ Python scripts for troubleshooting.
|
||||||
Gerrit Inspect can be started by adding '-s' option to the
|
Gerrit Inspect can be started by adding '-s' option to the
|
||||||
command used to launch the daemon:
|
command used to launch the daemon:
|
||||||
|
|
||||||
.Build based on Buck
|
|
||||||
----
|
|
||||||
java -jar buck-out/gen/gerrit/gerrit.war daemon -d ../gerrit_testsite -s
|
|
||||||
----
|
|
||||||
|
|
||||||
.Build based on Bazel
|
|
||||||
----
|
----
|
||||||
$(bazel info output_base)/external/local_jdk/bin/java \
|
$(bazel info output_base)/external/local_jdk/bin/java \
|
||||||
-jar bazel-bin/gerrit.war daemon -d ../gerrit_testsite -s
|
-jar bazel-bin/gerrit.war daemon -d ../gerrit_testsite -s
|
||||||
|
@ -250,12 +206,6 @@ when using the Inspector.
|
||||||
The embedded H2 database can be queried and updated from the
|
The embedded H2 database can be queried and updated from the
|
||||||
command line. If the daemon is not currently running:
|
command line. If the daemon is not currently running:
|
||||||
|
|
||||||
.Build based on Buck
|
|
||||||
----
|
|
||||||
java -jar buck-out/gen/gerrit/gerrit.war gsql -d ../gerrit_testsite
|
|
||||||
----
|
|
||||||
|
|
||||||
.Build based on Bazel
|
|
||||||
----
|
----
|
||||||
$(bazel info output_base)/external/local_jdk/bin/java \
|
$(bazel info output_base)/external/local_jdk/bin/java \
|
||||||
-jar bazel-bin/gerrit.war gsql -d ../gerrit_testsite -s
|
-jar bazel-bin/gerrit.war gsql -d ../gerrit_testsite -s
|
||||||
|
|
|
@ -111,8 +111,8 @@ the subproject.
|
||||||
* link:dev-release-subproject.html#prepare-release[Prepare the Release]
|
* link:dev-release-subproject.html#prepare-release[Prepare the Release]
|
||||||
* link:dev-release-subproject.html#publish-release[Publish the Release]
|
* link:dev-release-subproject.html#publish-release[Publish the Release]
|
||||||
|
|
||||||
* Update the `id`, `bin_sha1`, and `src_sha1` values in the `maven_jar`
|
* Update the `artifact`, `sha1`, and `src_sha1` values in the `maven_jar`
|
||||||
for the Subproject in `/lib/BUCK` to the released version.
|
for the Subproject in `WORKSPACE` to the released version.
|
||||||
|
|
||||||
[[update-versions]]
|
[[update-versions]]
|
||||||
=== Update Versions and Create Release Tag
|
=== Update Versions and Create Release Tag
|
||||||
|
@ -147,9 +147,8 @@ Tag the plugins:
|
||||||
* Build the Gerrit WAR, API JARs and documentation
|
* Build the Gerrit WAR, API JARs and documentation
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
buck clean
|
bazel build release Documentation:searchfree
|
||||||
buck build --no-cache release docs
|
./tools/maven/api.sh install
|
||||||
./tools/maven/api.sh install <buck|bazel>
|
|
||||||
----
|
----
|
||||||
|
|
||||||
* Sanity check WAR
|
* Sanity check WAR
|
||||||
|
@ -157,11 +156,10 @@ Tag the plugins:
|
||||||
|
|
||||||
* Verify plugin versions
|
* Verify plugin versions
|
||||||
+
|
+
|
||||||
Sometimes `buck` doesn't rebuild plugins after they are tagged, and the
|
Verify the versions:
|
||||||
versions don't reflect the tag. Verify the versions:
|
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
java -jar ./buck-out/gen/release/release.war init --list-plugins
|
java -jar bazel-bin/release.war init --list-plugins
|
||||||
----
|
----
|
||||||
|
|
||||||
[[publish-gerrit]]
|
[[publish-gerrit]]
|
||||||
|
@ -174,30 +172,24 @@ versions don't reflect the tag. Verify the versions:
|
||||||
link:dev-release-deploy-config.html#deploy-configuration-setting-maven-central[
|
link:dev-release-deploy-config.html#deploy-configuration-setting-maven-central[
|
||||||
configuration] for deploying to Maven Central
|
configuration] for deploying to Maven Central
|
||||||
|
|
||||||
* Make sure that the version is updated in the `VERSION` file and in
|
* Make sure that the version is updated in the `version.bzl` file and in
|
||||||
the `pom.xml` files as described in the link:#update-versions[Update
|
the `pom.xml` files as described in the link:#update-versions[Update
|
||||||
Versions and Create Release Tag] section.
|
Versions and Create Release Tag] section.
|
||||||
|
|
||||||
* Push the WAR to Maven Central:
|
* Push the WAR to Maven Central:
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
./tools/maven/api.sh war_deploy <buck|bazel>
|
./tools/maven/api.sh war_deploy
|
||||||
----
|
----
|
||||||
|
|
||||||
* Push the plugin artifacts to Maven Central:
|
* Push the plugin artifacts to Maven Central:
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
./tools/maven/api.sh deploy <buck|bazel>
|
./tools/maven/api.sh deploy
|
||||||
----
|
|
||||||
+
|
|
||||||
If no artifacts are uploaded, clean the `buck-out` folder and retry:
|
|
||||||
+
|
|
||||||
----
|
|
||||||
buck clean ; rm -rf buck-out
|
|
||||||
----
|
----
|
||||||
|
|
||||||
* To where the artifacts are uploaded depends on the `GERRIT_VERSION` in
|
* To where the artifacts are uploaded depends on the `GERRIT_VERSION` in
|
||||||
the `VERSION` file:
|
the `version.bzl` file:
|
||||||
|
|
||||||
** SNAPSHOT versions are directly uploaded into the Sonatype snapshots
|
** SNAPSHOT versions are directly uploaded into the Sonatype snapshots
|
||||||
repository and no further action is needed:
|
repository and no further action is needed:
|
||||||
|
@ -318,7 +310,7 @@ Push the new Release Tag on the plugins:
|
||||||
==== Upload the Documentation
|
==== Upload the Documentation
|
||||||
|
|
||||||
* Extract the documentation files from the zip file generated from
|
* Extract the documentation files from the zip file generated from
|
||||||
`buck build docs`: `buck-out/gen/Documentation/searchfree/searchfree.zip`.
|
`bazel build searchfree`: `bazel-bin/Documentation/searchfree.zip`.
|
||||||
|
|
||||||
* Upload the files manually via web browser to the appropriate folder
|
* Upload the files manually via web browser to the appropriate folder
|
||||||
in the
|
in the
|
||||||
|
@ -368,7 +360,7 @@ including some or all of the following in the email:
|
||||||
+
|
+
|
||||||
The SHA1 and MD5 can be taken from the artifact page on Sonatype. The
|
The SHA1 and MD5 can be taken from the artifact page on Sonatype. The
|
||||||
SHA256 can be generated with
|
SHA256 can be generated with
|
||||||
`openssl sha -sha256 buck-out/gen/release/release.war` or an equivalent
|
`openssl sha -sha256 bazel-bin/release.war` or an equivalent
|
||||||
command.
|
command.
|
||||||
|
|
||||||
* Update the new discussion group announcement to be sticky
|
* Update the new discussion group announcement to be sticky
|
||||||
|
@ -388,8 +380,7 @@ All new development that is done in the `master` branch will be included in the
|
||||||
next Gerrit release. The Gerrit version should be set to the snapshot version
|
next Gerrit release. The Gerrit version should be set to the snapshot version
|
||||||
for the next release.
|
for the next release.
|
||||||
|
|
||||||
Use the `version` tool to set the version in the `VERSION` file:
|
Use the `version` tool to set the version in the `version.bzl` file:
|
||||||
:
|
|
||||||
|
|
||||||
----
|
----
|
||||||
./tools/version.py 2.11-SNAPSHOT
|
./tools/version.py 2.11-SNAPSHOT
|
||||||
|
|
|
@ -1,178 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# Copyright (C) 2013 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.
|
|
||||||
#
|
|
||||||
# TODO(sop): Be more detailed: version, link to Maven Central
|
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
from collections import defaultdict, deque
|
|
||||||
import json
|
|
||||||
from os import chdir, path
|
|
||||||
from shutil import copyfileobj
|
|
||||||
from subprocess import Popen, PIPE
|
|
||||||
from sys import stdout, stderr
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument('--asciidoc', action='store_true')
|
|
||||||
parser.add_argument('--partial', action='store_true')
|
|
||||||
parser.add_argument('targets', nargs='+')
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
KNOWN_PROVIDED_DEPS = [
|
|
||||||
'//lib/bouncycastle:bcpg',
|
|
||||||
'//lib/bouncycastle:bcpkix',
|
|
||||||
'//lib/bouncycastle:bcprov',
|
|
||||||
]
|
|
||||||
|
|
||||||
for target in args.targets:
|
|
||||||
if not target.startswith('//'):
|
|
||||||
print('Target must be absolute: %s' % target, file=stderr)
|
|
||||||
|
|
||||||
def parse_graph():
|
|
||||||
graph = defaultdict(list)
|
|
||||||
while not path.isfile('.buckconfig'):
|
|
||||||
chdir('..')
|
|
||||||
query = ' + '.join('deps(%s)' % t for t in args.targets)
|
|
||||||
p = Popen([
|
|
||||||
'buck', 'query', query,
|
|
||||||
'--output-attributes=buck.direct_dependencies'], stdout=PIPE)
|
|
||||||
obj = json.load(p.stdout)
|
|
||||||
for target, attrs in obj.iteritems():
|
|
||||||
for dep in attrs['buck.direct_dependencies']:
|
|
||||||
|
|
||||||
if target in KNOWN_PROVIDED_DEPS:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if (args.partial
|
|
||||||
and dep == '//gerrit-gwtexpui:CSS'
|
|
||||||
and target == '//gerrit-gwtui:ui_module'):
|
|
||||||
continue
|
|
||||||
|
|
||||||
graph[target].append(dep)
|
|
||||||
r = p.wait()
|
|
||||||
if r != 0:
|
|
||||||
exit(r)
|
|
||||||
return graph
|
|
||||||
|
|
||||||
graph = parse_graph()
|
|
||||||
licenses = defaultdict(set)
|
|
||||||
|
|
||||||
do_not_distribute = False
|
|
||||||
queue = deque(args.targets)
|
|
||||||
while queue:
|
|
||||||
target = queue.popleft()
|
|
||||||
for dep in graph[target]:
|
|
||||||
if not dep.startswith('//lib:LICENSE-'):
|
|
||||||
continue
|
|
||||||
if 'DO_NOT_DISTRIBUTE' in dep:
|
|
||||||
do_not_distribute = True
|
|
||||||
licenses[dep].add(target)
|
|
||||||
queue.extend(graph[target])
|
|
||||||
|
|
||||||
if do_not_distribute:
|
|
||||||
print('DO_NOT_DISTRIBUTE license found', file=stderr)
|
|
||||||
for target in args.targets:
|
|
||||||
print('...via %s:' % target)
|
|
||||||
Popen(['buck', 'query',
|
|
||||||
'allpaths(%s, //lib:LICENSE-DO_NOT_DISTRIBUTE)' % target],
|
|
||||||
stdout=stderr).communicate()
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
used = sorted(licenses.keys())
|
|
||||||
|
|
||||||
if args.asciidoc:
|
|
||||||
print("""\
|
|
||||||
= Gerrit Code Review - Licenses
|
|
||||||
|
|
||||||
Gerrit open source software is licensed under the <<Apache2_0,Apache
|
|
||||||
License 2.0>>. Executable distributions also include other software
|
|
||||||
components that are provided under additional licenses.
|
|
||||||
|
|
||||||
[[cryptography]]
|
|
||||||
== Cryptography Notice
|
|
||||||
|
|
||||||
This distribution includes cryptographic software. The country
|
|
||||||
in which you currently reside may have restrictions on the import,
|
|
||||||
possession, use, and/or re-export to another country, of encryption
|
|
||||||
software. BEFORE using any encryption software, please check
|
|
||||||
your country's laws, regulations and policies concerning the
|
|
||||||
import, possession, or use, and re-export of encryption software,
|
|
||||||
to see if this is permitted. See the
|
|
||||||
link:http://www.wassenaar.org/[Wassenaar Arrangement]
|
|
||||||
for more information.
|
|
||||||
|
|
||||||
The U.S. Government Department of Commerce, Bureau of Industry
|
|
||||||
and Security (BIS), has classified this software as Export
|
|
||||||
Commodity Control Number (ECCN) 5D002.C.1, which includes
|
|
||||||
information security software using or performing cryptographic
|
|
||||||
functions with asymmetric algorithms. The form and manner of
|
|
||||||
this distribution makes it eligible for export under the License
|
|
||||||
Exception ENC Technology Software Unrestricted (TSU) exception
|
|
||||||
(see the BIS Export Administration Regulations, Section 740.13)
|
|
||||||
for both object code and source code.
|
|
||||||
|
|
||||||
Gerrit includes an SSH daemon (Apache SSHD), to support authenticated
|
|
||||||
uploads of changes directly from `git push` command line clients.
|
|
||||||
|
|
||||||
Gerrit includes an SSH client (JSch), to support authenticated
|
|
||||||
replication of changes to remote systems, such as for automatic
|
|
||||||
updates of mirror servers, or realtime backups.
|
|
||||||
|
|
||||||
For either feature to function, Gerrit requires the
|
|
||||||
link:http://java.sun.com/javase/technologies/security/[Java Cryptography extensions]
|
|
||||||
and/or the
|
|
||||||
link:http://www.bouncycastle.org/java.html[Bouncy Castle Crypto API]
|
|
||||||
to be installed by the end-user.
|
|
||||||
|
|
||||||
== Licenses
|
|
||||||
""")
|
|
||||||
|
|
||||||
for n in used:
|
|
||||||
libs = sorted(licenses[n])
|
|
||||||
name = n[len('//lib:LICENSE-'):]
|
|
||||||
if args.asciidoc:
|
|
||||||
print()
|
|
||||||
print('[[%s]]' % name.replace('.', '_'))
|
|
||||||
print("=== " + name)
|
|
||||||
print()
|
|
||||||
else:
|
|
||||||
print()
|
|
||||||
print(name)
|
|
||||||
print()
|
|
||||||
print('----')
|
|
||||||
for d in libs:
|
|
||||||
if d.startswith('//lib:') or d.startswith('//lib/'):
|
|
||||||
p = d[len('//lib:'):]
|
|
||||||
else:
|
|
||||||
p = d[d.index(':')+1:].lower()
|
|
||||||
if '__' in p:
|
|
||||||
p = p[:p.index('__')]
|
|
||||||
print('* ' + p)
|
|
||||||
if args.asciidoc:
|
|
||||||
print()
|
|
||||||
print('[[%s_license]]' % name.replace('.', '_'))
|
|
||||||
print('----')
|
|
||||||
with open(n[2:].replace(':', '/')) as fd:
|
|
||||||
copyfileobj(fd, stdout)
|
|
||||||
print()
|
|
||||||
print('----')
|
|
||||||
|
|
||||||
if args.asciidoc:
|
|
||||||
print("""
|
|
||||||
GERRIT
|
|
||||||
------
|
|
||||||
Part of link:index.html[Gerrit Code Review]
|
|
||||||
""")
|
|
|
@ -61,7 +61,6 @@
|
||||||
== Developer
|
== Developer
|
||||||
. Getting Started
|
. Getting Started
|
||||||
.. link:dev-readme.html[Developer Setup]
|
.. link:dev-readme.html[Developer Setup]
|
||||||
.. link:dev-buck.html[Building with Buck]
|
|
||||||
.. link:dev-bazel.html[Building with Bazel]
|
.. link:dev-bazel.html[Building with Bazel]
|
||||||
.. link:dev-eclipse.html[Eclipse Setup]
|
.. link:dev-eclipse.html[Eclipse Setup]
|
||||||
.. link:dev-intellij.html[IntelliJ Setup]
|
.. link:dev-intellij.html[IntelliJ Setup]
|
||||||
|
|
|
@ -596,7 +596,7 @@ The project-specific download commands must be configured in the
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
[plugin "project-download-commands"]
|
[plugin "project-download-commands"]
|
||||||
Build = git fetch ${url} ${ref} && git checkout FETCH_HEAD && buck build ${project}
|
Build = git fetch ${url} ${ref} && git checkout FETCH_HEAD && bazel build ${project}
|
||||||
Update = git fetch ${url} ${ref} && git checkout FETCH_HEAD && git submodule update
|
Update = git fetch ${url} ${ref} && git checkout FETCH_HEAD && git submodule update
|
||||||
----
|
----
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
def genlicenses(
|
|
||||||
name,
|
|
||||||
out,
|
|
||||||
opts = [],
|
|
||||||
java_deps = [],
|
|
||||||
non_java_deps = [],
|
|
||||||
visibility = []):
|
|
||||||
cmd = ['$(exe :gen_licenses)']
|
|
||||||
cmd.extend(opts)
|
|
||||||
cmd.append('>$OUT')
|
|
||||||
cmd.extend(java_deps)
|
|
||||||
cmd.extend(non_java_deps)
|
|
||||||
|
|
||||||
# Must use $(classpath) for Java deps, since transitive dependencies are not
|
|
||||||
# first-order dependencies of the output jar, so changes would not cause
|
|
||||||
# invalidation of the build cache key for the genrule.
|
|
||||||
cmd.extend('; true $(classpath %s)' % d for d in java_deps)
|
|
||||||
|
|
||||||
# Must use $(location) for non-Java deps, since $(classpath) will fail with an
|
|
||||||
# error. This is ok, because transitive dependencies are included in the
|
|
||||||
# output artifacts for everything _except_ Java libraries.
|
|
||||||
cmd.extend('; true $(location %s)' % d for d in non_java_deps)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = name,
|
|
||||||
out = out,
|
|
||||||
cmd = ' '.join(cmd),
|
|
||||||
visibility = visibility,
|
|
||||||
)
|
|
|
@ -6,9 +6,9 @@ link:rest-api.html[REST API].
|
||||||
|
|
||||||
Please note that this feature is only usable with documentation built-in.
|
Please note that this feature is only usable with documentation built-in.
|
||||||
You'll need to
|
You'll need to
|
||||||
`buck build withdocs`
|
`bazel build withdocs`
|
||||||
or
|
or
|
||||||
`buck build release`
|
`bazel build release`
|
||||||
to test this feature.
|
to test this feature.
|
||||||
|
|
||||||
[[documentation-endpoints]]
|
[[documentation-endpoints]]
|
||||||
|
|
|
@ -50,10 +50,10 @@ Gerrit is provided under the Apache License 2.0.
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Install [Buck](http://facebook.github.io/buck/setup/install.html) and run the following:
|
Install [Bazel](https://bazel.build/versions/master/docs/install.html) and run the following:
|
||||||
|
|
||||||
git clone --recursive https://gerrit.googlesource.com/gerrit
|
git clone --recursive https://gerrit.googlesource.com/gerrit
|
||||||
cd gerrit && buck build release
|
cd gerrit && bazel build release
|
||||||
|
|
||||||
## Install binary packages (Deb/Rpm)
|
## Install binary packages (Deb/Rpm)
|
||||||
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
include_defs('//Documentation/asciidoc.defs')
|
|
||||||
include_defs('//ReleaseNotes/config.defs')
|
|
||||||
|
|
||||||
DIR = 'ReleaseNotes'
|
|
||||||
|
|
||||||
SRCS = glob(['*.txt'])
|
|
||||||
|
|
||||||
|
|
||||||
genasciidoc(
|
|
||||||
name = 'html',
|
|
||||||
out = 'html.zip',
|
|
||||||
directory = DIR,
|
|
||||||
srcs = SRCS,
|
|
||||||
attributes = release_notes_attributes(),
|
|
||||||
backend = 'html5',
|
|
||||||
searchbox = False,
|
|
||||||
resources = False,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,14 +0,0 @@
|
||||||
def release_notes_attributes():
|
|
||||||
return [
|
|
||||||
'toc',
|
|
||||||
'newline="\\n"',
|
|
||||||
'asterisk="*"',
|
|
||||||
'plus="+"',
|
|
||||||
'caret="^"',
|
|
||||||
'startsb="["',
|
|
||||||
'endsb="]"',
|
|
||||||
'tilde="~"',
|
|
||||||
'last-update-label!',
|
|
||||||
'stylesheet=DEFAULT',
|
|
||||||
'linkcss=true',
|
|
||||||
]
|
|
|
@ -1,21 +0,0 @@
|
||||||
#
|
|
||||||
# Dummy to make the co-existence of core and standalone plugins possible.
|
|
||||||
# Intentionaly left empty as this doesn't suppose to have any side effects
|
|
||||||
# in tree build, i. e.:
|
|
||||||
#
|
|
||||||
# cookbook-plugin/BUCK include this line:
|
|
||||||
# include_defs('//bucklets/gerrit_plugin.bucklet')
|
|
||||||
#
|
|
||||||
# When executing from the Gerrit tree:
|
|
||||||
# buck build plugins/cookbook-plugin
|
|
||||||
#
|
|
||||||
# this line has no effect.
|
|
||||||
#
|
|
||||||
# When compiling from standalone cookbook-plugin, bucklets directory points
|
|
||||||
# to cloned bucklets library that includes real gerrit_plugin.bucklet code.
|
|
||||||
|
|
||||||
GERRIT_GWT_API = ['//gerrit-plugin-gwtui:gwtui-api']
|
|
||||||
GERRIT_PLUGIN_API = ['//gerrit-plugin-api:lib']
|
|
||||||
GERRIT_TESTS = ['//gerrit-acceptance-framework:lib']
|
|
||||||
|
|
||||||
STANDALONE_MODE = False
|
|
|
@ -1 +0,0 @@
|
||||||
../tools/java_doc.defs
|
|
|
@ -1 +0,0 @@
|
||||||
../tools/java_sources.defs
|
|
|
@ -1 +0,0 @@
|
||||||
../lib/maven.defs
|
|
|
@ -1 +0,0 @@
|
||||||
../tools/maven/package.defs
|
|
|
@ -1,108 +0,0 @@
|
||||||
// Copyright (C) 2016 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.
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
"regexp"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
// Define regex to find a comment in the build files
|
|
||||||
commentRE = regexp.MustCompile("#.*")
|
|
||||||
// Define regexes to extract the lib name and sha1
|
|
||||||
mvnRE = regexp.MustCompile("maven_jar([^)]*)")
|
|
||||||
sha1RE = regexp.MustCompile("sha1=[\"'](?P<SHA1>[^,]*)[\"']")
|
|
||||||
bSha1RE = regexp.MustCompile("bin_sha1=[\"'](?P<SHA1>[^,]*)[\"']")
|
|
||||||
libNameRE = regexp.MustCompile("name=[\"'](?P<NAME>[^,]*)[\"']")
|
|
||||||
)
|
|
||||||
|
|
||||||
func sanitize(s string) string {
|
|
||||||
// Strip out comments
|
|
||||||
s = commentRE.ReplaceAllString(s, "")
|
|
||||||
// Remove newlines and blanks
|
|
||||||
s = strings.Replace(s, "\n", "", -1)
|
|
||||||
s = strings.Replace(s, " ", "", -1)
|
|
||||||
// WORKSPACE syntax disallows the dash char in artifact name and we use an underscore
|
|
||||||
// So we make this a consistent underscore in all files
|
|
||||||
s = strings.Replace(s, "-", "_", -1)
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
// Load bazel WORKSPACE file
|
|
||||||
bzlDat, err := ioutil.ReadFile("WORKSPACE")
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
bzlStr := sanitize(string(bzlDat))
|
|
||||||
|
|
||||||
// Walk all files nested under lib. Find, load and sanitize BUCK files
|
|
||||||
bckStrs := []string{}
|
|
||||||
err = filepath.Walk("lib/", func(path string, f os.FileInfo, err error) error {
|
|
||||||
bckFile := filepath.Join(path, "BUCK")
|
|
||||||
if _, err := os.Stat(bckFile); err == nil {
|
|
||||||
bckDat, err := ioutil.ReadFile(bckFile)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
bckStrs = append(bckStrs, sanitize(string(bckDat)))
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
bckStr := strings.Join(bckStrs, "")
|
|
||||||
|
|
||||||
// Find all bazel dependencies
|
|
||||||
// bzlVersions maps from a lib name to the referenced sha1
|
|
||||||
bzlVersions := make(map[string]string)
|
|
||||||
for _, mvn := range mvnRE.FindAllString(bzlStr, -1) {
|
|
||||||
sha1s := sha1RE.FindStringSubmatch(mvn)
|
|
||||||
names := libNameRE.FindStringSubmatch(mvn)
|
|
||||||
if len(sha1s) > 1 && len(names) > 1 {
|
|
||||||
bzlVersions[names[1]] = sha1RE.FindStringSubmatch(mvn)[1]
|
|
||||||
} else {
|
|
||||||
fmt.Printf("Can't parse lib sha1/name of target %s\n", mvn)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find all buck dependencies and check if we have the correct bazel dependency on file
|
|
||||||
for _, mvn := range mvnRE.FindAllString(bckStr, -1) {
|
|
||||||
sha1s := bSha1RE.FindStringSubmatch(mvn)
|
|
||||||
if len(sha1s) < 2 {
|
|
||||||
// Buck knows two dep version representations: just a SHA1 or a bin_sha1 and src_sha1
|
|
||||||
// We try to extract the bin_sha1 first. If that fails, we use the sha1
|
|
||||||
sha1s = sha1RE.FindStringSubmatch(mvn)
|
|
||||||
}
|
|
||||||
names := libNameRE.FindStringSubmatch(mvn)
|
|
||||||
if len(sha1s) > 1 && len(names) > 1 {
|
|
||||||
if _, ok := bzlVersions[names[1]]; !ok {
|
|
||||||
// TODO(hiesel) This produces too many false positives.
|
|
||||||
//fmt.Printf("Don't have lib %s in bazel\n", names[1])
|
|
||||||
} else if bzlVersions[names[1]] != sha1s[1] {
|
|
||||||
fmt.Printf("SHA1 of lib %s does not match: buck has %s while bazel has %s\n", names[1], sha1s[1], bzlVersions[names[1]])
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
fmt.Printf("Can't parse lib sha1/name on target %s\n", mvn)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'bcprov__unsign',
|
|
||||||
cmd = ' && '.join([
|
|
||||||
'unzip -qd $TMP $(location //lib/bouncycastle:bcprov)',
|
|
||||||
'cd $TMP',
|
|
||||||
'zip -Drq $OUT . -x META-INF/\*.RSA META-INF/\*.DSA META-INF/\*.SF META-INF/\*.LIST',
|
|
||||||
]),
|
|
||||||
out = 'bcprov-unsigned.jar',
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'bcprov',
|
|
||||||
binary_jar = ':bcprov__unsign',
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'bcpkix__unsign',
|
|
||||||
cmd = ' && '.join([
|
|
||||||
'unzip -qd $TMP $(location //lib/bouncycastle:bcpkix)',
|
|
||||||
'cd $TMP',
|
|
||||||
'zip -Drq $OUT . -x META-INF/\*.RSA META-INF/\*.DSA META-INF/\*.SF META-INF/\*.LIST',
|
|
||||||
]),
|
|
||||||
out = 'bcpkix-unsigned.jar',
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'bcpkix',
|
|
||||||
binary_jar = ':bcpkix__unsign',
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'convertkey__lib',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':bcprov',
|
|
||||||
':bcpkix',
|
|
||||||
'//lib:jsch',
|
|
||||||
'//lib/log:nop',
|
|
||||||
'//lib/mina:sshd',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'convertkey',
|
|
||||||
deps = [':convertkey__lib'],
|
|
||||||
main_class = 'com.googlesource.gerrit.convertkey.ConvertKey',
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
SRCS = glob(['src/test/java/com/google/gerrit/acceptance/*.java'])
|
|
||||||
|
|
||||||
PROVIDED = [
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-httpd:httpd',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//gerrit-pgm:init',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:jsch',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/mina:sshd',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'acceptance-framework',
|
|
||||||
merge_manifests = False,
|
|
||||||
manifest_file = ':manifest',
|
|
||||||
deps = [':lib'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'manifest',
|
|
||||||
cmd = 'echo "Manifest-Version: 1.0" >$OUT;' +
|
|
||||||
'echo "Implementation-Title: Gerrit Acceptance Test Framework" >>$OUT;' +
|
|
||||||
'echo "Implementation-Vendor: Gerrit Code Review Project" >>$OUT',
|
|
||||||
out = 'manifest.txt',
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'lib',
|
|
||||||
srcs = SRCS,
|
|
||||||
exported_deps = [
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-gpg:gpg',
|
|
||||||
'//gerrit-launcher:launcher',
|
|
||||||
'//gerrit-openid:openid',
|
|
||||||
'//gerrit-pgm:daemon',
|
|
||||||
'//gerrit-pgm:http-jetty',
|
|
||||||
'//gerrit-pgm:util-nodep',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
|
||||||
'//gerrit-server:testutil',
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
'//lib/httpcomponents:fluent-hc',
|
|
||||||
'//lib/httpcomponents:httpclient',
|
|
||||||
'//lib/httpcomponents:httpcore',
|
|
||||||
'//lib/jetty:servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
|
||||||
'//lib/log:impl_log4j',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
'//lib:truth',
|
|
||||||
],
|
|
||||||
provided_deps = PROVIDED + [
|
|
||||||
'//lib/greenmail:greenmail',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/mail:mail',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_sources(
|
|
||||||
name = 'acceptance-framework-src',
|
|
||||||
srcs = SRCS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_doc(
|
|
||||||
name = 'acceptance-framework-javadoc',
|
|
||||||
title = 'Gerrit Acceptance Test Framework Documentation',
|
|
||||||
pkgs = [' com.google.gerrit.acceptance'],
|
|
||||||
source_jar = ':acceptance-framework-src',
|
|
||||||
srcs = SRCS,
|
|
||||||
deps = PROVIDED + [
|
|
||||||
':lib',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice_library',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/guice:javax-inject',
|
|
||||||
'//lib:gwtorm_client',
|
|
||||||
'//lib:junit',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,48 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'lib',
|
|
||||||
srcs = glob(['src/test/java/com/google/gerrit/acceptance/*.java']),
|
|
||||||
exported_deps = [
|
|
||||||
'//gerrit-acceptance-framework:lib',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gpg:testutil',
|
|
||||||
'//gerrit-launcher:launcher',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//gerrit-httpd:httpd',
|
|
||||||
'//gerrit-pgm:init',
|
|
||||||
'//gerrit-pgm:pgm',
|
|
||||||
'//gerrit-pgm:util',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-server:testutil',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
|
||||||
'//gerrit-sshd:sshd',
|
|
||||||
'//gerrit-test-util:test_util',
|
|
||||||
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:h2',
|
|
||||||
'//lib:jsch',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
|
|
||||||
'//lib/bouncycastle:bcpg',
|
|
||||||
'//lib/bouncycastle:bcprov',
|
|
||||||
'//lib/commons:compress',
|
|
||||||
'//lib/greenmail:greenmail',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/mail:mail',
|
|
||||||
'//lib/mina:sshd',
|
|
||||||
],
|
|
||||||
visibility = [
|
|
||||||
'//gerrit-plugin-api/...',
|
|
||||||
'//tools/eclipse:classpath',
|
|
||||||
'//gerrit-acceptance-tests/...',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'api_account',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['api'],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'api_change',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['api'],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'api_config',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['api'],
|
|
||||||
)
|
|
|
@ -1,23 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'api_group',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
deps = [
|
|
||||||
':util',
|
|
||||||
'//gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/account:util',
|
|
||||||
],
|
|
||||||
labels = ['api'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'util',
|
|
||||||
srcs = ['GroupAssert.java'],
|
|
||||||
deps = [
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:truth',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'api_project',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['api'],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'api_revision',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['api'],
|
|
||||||
)
|
|
|
@ -1,10 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'edit',
|
|
||||||
srcs = ['ChangeEditIT.java'],
|
|
||||||
deps = [
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
],
|
|
||||||
labels = ['edit'],
|
|
||||||
)
|
|
|
@ -1,27 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'git',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
deps = [
|
|
||||||
':submodule_util',
|
|
||||||
':push_for_review',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
],
|
|
||||||
labels = ['git'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'push_for_review',
|
|
||||||
srcs = ['AbstractPushForReview.java'],
|
|
||||||
deps = [
|
|
||||||
'//gerrit-acceptance-tests:lib',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'submodule_util',
|
|
||||||
srcs = ['AbstractSubmoduleSubscription.java',],
|
|
||||||
deps = ['//gerrit-acceptance-tests:lib',]
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'pgm',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['pgm'],
|
|
||||||
)
|
|
|
@ -1,23 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'rest_account',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
deps = [':util'],
|
|
||||||
labels = ['rest'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'util',
|
|
||||||
srcs = [
|
|
||||||
'AccountAssert.java',
|
|
||||||
'CapabilityInfo.java',
|
|
||||||
],
|
|
||||||
deps = [
|
|
||||||
'//gerrit-acceptance-tests:lib',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:junit',
|
|
||||||
],
|
|
||||||
visibility = ['//gerrit-acceptance-tests/...'],
|
|
||||||
)
|
|
|
@ -1,34 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
SUBMIT_UTIL_SRCS = glob(['AbstractSubmit*.java'])
|
|
||||||
SUBMIT_TESTS = glob(['Submit*IT.java'])
|
|
||||||
OTHER_TESTS = glob(['*IT.java'], excludes = SUBMIT_TESTS)
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'rest_change_other',
|
|
||||||
srcs = OTHER_TESTS,
|
|
||||||
deps = [
|
|
||||||
':submit_util',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
],
|
|
||||||
labels = ['rest'],
|
|
||||||
)
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'rest_change_submit',
|
|
||||||
srcs = SUBMIT_TESTS,
|
|
||||||
deps = [
|
|
||||||
':submit_util',
|
|
||||||
],
|
|
||||||
labels = ['rest'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'submit_util',
|
|
||||||
srcs = SUBMIT_UTIL_SRCS,
|
|
||||||
deps = [
|
|
||||||
'//gerrit-acceptance-tests:lib',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'rest_config',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['rest']
|
|
||||||
)
|
|
|
@ -1,8 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'rest_group',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['rest']
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'rest_project',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
deps = [
|
|
||||||
':project',
|
|
||||||
':refassert',
|
|
||||||
],
|
|
||||||
labels = ['rest'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'refassert',
|
|
||||||
srcs = [
|
|
||||||
'RefAssert.java',
|
|
||||||
],
|
|
||||||
deps = [
|
|
||||||
'//lib:truth',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'project',
|
|
||||||
srcs = [
|
|
||||||
'ProjectAssert.java',
|
|
||||||
],
|
|
||||||
deps = [
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:truth',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'server_change',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['server'],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'server_event',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['server'],
|
|
||||||
)
|
|
|
@ -1,10 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'server_mail',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['server'],
|
|
||||||
deps = [
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'server_notedb',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['notedb', 'server'],
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'server_project',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
labels = ['server'],
|
|
||||||
)
|
|
|
@ -1,8 +0,0 @@
|
||||||
include_defs('//gerrit-acceptance-tests/tests.defs')
|
|
||||||
|
|
||||||
acceptance_tests(
|
|
||||||
group = 'ssh',
|
|
||||||
srcs = glob(['*IT.java']),
|
|
||||||
deps = ['//lib/commons:compress'],
|
|
||||||
labels = ['ssh'],
|
|
||||||
)
|
|
|
@ -1,27 +0,0 @@
|
||||||
BOUNCYCASTLE = [
|
|
||||||
'//lib/bouncycastle:bcpkix',
|
|
||||||
'//lib/bouncycastle:bcpg',
|
|
||||||
]
|
|
||||||
|
|
||||||
def acceptance_tests(
|
|
||||||
group,
|
|
||||||
srcs,
|
|
||||||
deps = [],
|
|
||||||
labels = [],
|
|
||||||
vm_args = ['-Xmx256m']):
|
|
||||||
from os import path
|
|
||||||
if path.exists('/dev/urandom'):
|
|
||||||
vm_args = vm_args + ['-Djava.security.egd=file:/dev/./urandom']
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = group,
|
|
||||||
srcs = srcs,
|
|
||||||
deps = deps + BOUNCYCASTLE + [
|
|
||||||
'//gerrit-acceptance-tests:lib'
|
|
||||||
],
|
|
||||||
labels = labels + [
|
|
||||||
'acceptance',
|
|
||||||
'slow',
|
|
||||||
],
|
|
||||||
vm_args = vm_args,
|
|
||||||
)
|
|
|
@ -1,36 +0,0 @@
|
||||||
PARSER_DEPS = [
|
|
||||||
':query_exception',
|
|
||||||
'//lib/antlr:java_runtime',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'query_exception',
|
|
||||||
srcs = ['src/main/java/com/google/gerrit/server/query/QueryParseException.java'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genantlr(
|
|
||||||
name = 'query_antlr',
|
|
||||||
srcs = ['src/main/antlr3/com/google/gerrit/server/query/Query.g'],
|
|
||||||
out = 'query_antlr.src.zip',
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'lib',
|
|
||||||
srcs = [':query_antlr'],
|
|
||||||
deps = PARSER_DEPS,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Hack necessary to expose ANTLR generated code as JAR to Eclipse.
|
|
||||||
genrule(
|
|
||||||
name = 'query_link',
|
|
||||||
cmd = 'ln -s $(location :lib) $OUT',
|
|
||||||
out = 'query_parser.jar',
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'query_parser',
|
|
||||||
binary_jar = ':query_link',
|
|
||||||
deps = PARSER_DEPS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,28 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'cache-h2',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:h2',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/log:api',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'tests',
|
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':cache-h2',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:h2',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib:junit',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,75 +0,0 @@
|
||||||
SRC = 'src/main/java/com/google/gerrit/'
|
|
||||||
|
|
||||||
ANNOTATIONS = [
|
|
||||||
SRC + x for x in [
|
|
||||||
'common/Nullable.java',
|
|
||||||
'common/audit/Audit.java',
|
|
||||||
'common/auth/SignInRequired.java',
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'annotations',
|
|
||||||
srcs = ANNOTATIONS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'client',
|
|
||||||
srcs = glob([SRC + 'common/**/*.java']),
|
|
||||||
gwt_xml = SRC + 'Common.gwt.xml',
|
|
||||||
exported_deps = [
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-prettify:client',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm_client',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/log:api',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'server',
|
|
||||||
srcs = glob([SRC + 'common/**/*.java'], excludes = ANNOTATIONS),
|
|
||||||
deps = [
|
|
||||||
':annotations',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-patch-jgit:server',
|
|
||||||
'//gerrit-prettify:server',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/log:api',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
TEST = 'src/test/java/com/google/gerrit/common/'
|
|
||||||
AUTO_VALUE_TEST_SRCS = [TEST + 'AutoValueTest.java']
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'client_tests',
|
|
||||||
srcs = glob(['src/test/java/**/*.java'], excludes = AUTO_VALUE_TEST_SRCS),
|
|
||||||
deps = [
|
|
||||||
':client',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib:truth',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'auto_value_tests',
|
|
||||||
srcs = AUTO_VALUE_TEST_SRCS,
|
|
||||||
deps = [
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,51 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'elasticsearch',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:client',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:protobuf',
|
|
||||||
'//lib/commons:codec',
|
|
||||||
'//lib/commons:lang',
|
|
||||||
'//lib/elasticsearch:elasticsearch',
|
|
||||||
'//lib/elasticsearch:jest',
|
|
||||||
'//lib/elasticsearch:jest-common',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/lucene:lucene-analyzers-common',
|
|
||||||
'//lib/lucene:lucene-core',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'elasticsearch_tests',
|
|
||||||
labels = ['elastic', 'flaky'],
|
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':elasticsearch',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:client',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-server:testutil',
|
|
||||||
'//gerrit-server:query_tests',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/elasticsearch:elasticsearch',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,89 +0,0 @@
|
||||||
include_defs('//lib/JGIT_VERSION')
|
|
||||||
include_defs('//lib/GUAVA_VERSION')
|
|
||||||
|
|
||||||
SRC = 'src/main/java/com/google/gerrit/extensions/'
|
|
||||||
SRCS = glob([SRC + '**/*.java'])
|
|
||||||
|
|
||||||
EXT_API_SRCS = glob([SRC + 'client/*.java'])
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'client',
|
|
||||||
srcs = EXT_API_SRCS,
|
|
||||||
gwt_xml = SRC + 'Extensions.gwt.xml',
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'client-lib',
|
|
||||||
srcs = EXT_API_SRCS,
|
|
||||||
resources = EXT_API_SRCS + glob([SRC + 'Extensions.gwt.xml']),
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'extension-api',
|
|
||||||
deps = [':lib'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'lib',
|
|
||||||
exported_deps = [
|
|
||||||
':api',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'api',
|
|
||||||
srcs = glob([SRC + '**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
],
|
|
||||||
provided_deps = [
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_sources(
|
|
||||||
name = 'extension-api-src',
|
|
||||||
srcs = SRCS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'api_tests',
|
|
||||||
srcs = glob(['src/test/java/**/*Test.java']),
|
|
||||||
deps = [
|
|
||||||
':api',
|
|
||||||
'//gerrit-test-util:test_util',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_doc(
|
|
||||||
name = 'extension-api-javadoc',
|
|
||||||
title = 'Gerrit Review Extension API Documentation',
|
|
||||||
pkgs = ['com.google.gerrit.extensions'],
|
|
||||||
source_jar = ':extension-api-src',
|
|
||||||
srcs = SRCS,
|
|
||||||
deps = [
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/guice:javax-inject',
|
|
||||||
'//lib/guice:guice_library',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
external_docs = [JGIT_DOC_URL, GUAVA_DOC_URL],
|
|
||||||
)
|
|
|
@ -1,56 +0,0 @@
|
||||||
DEPS = [
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/log:api',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'gpg',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
provided_deps = DEPS + [
|
|
||||||
'//lib/bouncycastle:bcpg',
|
|
||||||
'//lib/bouncycastle:bcprov',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
TESTUTIL_SRCS = glob(['src/test/**/testutil/**/*.java'])
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'testutil',
|
|
||||||
srcs = TESTUTIL_SRCS,
|
|
||||||
deps = DEPS + [
|
|
||||||
':gpg',
|
|
||||||
'//lib/bouncycastle:bcpg',
|
|
||||||
'//lib/bouncycastle:bcprov',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'gpg_tests',
|
|
||||||
srcs = glob(
|
|
||||||
['src/test/java/**/*.java'],
|
|
||||||
excludes = TESTUTIL_SRCS,
|
|
||||||
),
|
|
||||||
deps = DEPS + [
|
|
||||||
':gpg',
|
|
||||||
':testutil',
|
|
||||||
'//gerrit-cache-h2:cache-h2',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//gerrit-server:testutil',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/bouncycastle:bcpg',
|
|
||||||
'//lib/bouncycastle:bcprov',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
|
||||||
],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,17 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'gwtdebug',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-pgm:daemon',
|
|
||||||
'//gerrit-pgm:pgm',
|
|
||||||
'//gerrit-pgm:util',
|
|
||||||
'//gerrit-util-cli:cli',
|
|
||||||
'//lib/gwt:dev',
|
|
||||||
'//lib/jetty:server',
|
|
||||||
'//lib/jetty:servlet',
|
|
||||||
'//lib/jetty:servlets',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,113 +0,0 @@
|
||||||
SRC = 'src/main/java/com/google/gwtexpui/'
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'Clippy',
|
|
||||||
srcs = glob([SRC + 'clippy/client/*.java']),
|
|
||||||
gwt_xml = SRC + 'clippy/Clippy.gwt.xml',
|
|
||||||
resources = [
|
|
||||||
SRC + 'clippy/client/clippy.css',
|
|
||||||
SRC + 'clippy/client/clippy.swf',
|
|
||||||
SRC + 'clippy/client/page_white_copy.png',
|
|
||||||
SRC + 'clippy/client/CopyableLabelText.properties',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib/gwt:user'],
|
|
||||||
deps = [
|
|
||||||
':SafeHtml',
|
|
||||||
':UserAgent',
|
|
||||||
'//lib:LICENSE-clippy',
|
|
||||||
'//lib:LICENSE-silk_icons',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'CSS',
|
|
||||||
srcs = glob([SRC + 'css/rebind/*.java']),
|
|
||||||
resources = [SRC + 'css/CSS.gwt.xml'],
|
|
||||||
provided_deps = ['//lib/gwt:dev'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'GlobalKey',
|
|
||||||
srcs = glob([SRC + 'globalkey/client/*.java']),
|
|
||||||
gwt_xml = SRC + 'globalkey/GlobalKey.gwt.xml',
|
|
||||||
resources = [
|
|
||||||
SRC + 'globalkey/client/KeyConstants.properties',
|
|
||||||
SRC + 'globalkey/client/key.css',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib/gwt:user'],
|
|
||||||
deps = [
|
|
||||||
':SafeHtml',
|
|
||||||
':UserAgent',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'linker_server',
|
|
||||||
srcs = glob([SRC + 'linker/server/*.java']),
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'Progress',
|
|
||||||
srcs = glob([SRC + 'progress/client/*.java']),
|
|
||||||
gwt_xml = SRC + 'progress/Progress.gwt.xml',
|
|
||||||
resources = [SRC + 'progress/client/progress.css'],
|
|
||||||
provided_deps = ['//lib/gwt:user'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'SafeHtml',
|
|
||||||
srcs = glob([SRC + 'safehtml/client/*.java']),
|
|
||||||
gwt_xml = SRC + 'safehtml/SafeHtml.gwt.xml',
|
|
||||||
resources = [SRC + 'safehtml/client/safehtml.css'],
|
|
||||||
provided_deps = ['//lib/gwt:user'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'SafeHtml_tests',
|
|
||||||
srcs = glob([
|
|
||||||
'src/test/java/com/google/gwtexpui/safehtml/client/**/*.java',
|
|
||||||
]),
|
|
||||||
deps = [
|
|
||||||
':SafeHtml',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/gwt:user',
|
|
||||||
'//lib/gwt:dev',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'UserAgent',
|
|
||||||
srcs = glob([SRC + 'user/client/*.java']),
|
|
||||||
gwt_xml = SRC + 'user/User.gwt.xml',
|
|
||||||
resources = [SRC + 'user/client/tooltip.css'],
|
|
||||||
provided_deps = ['//lib/gwt:user'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'server',
|
|
||||||
srcs = glob([SRC + 'server/*.java']),
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'client-src-lib',
|
|
||||||
srcs = [],
|
|
||||||
resources = glob(
|
|
||||||
[SRC + n for n in [
|
|
||||||
'clippy/**/*',
|
|
||||||
'globalkey/**/*',
|
|
||||||
'safehtml/**/*',
|
|
||||||
'user/**/*',
|
|
||||||
]]
|
|
||||||
),
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,59 +0,0 @@
|
||||||
EXPORTED_DEPS = [
|
|
||||||
'//gerrit-common:client',
|
|
||||||
'//gerrit-gwtexpui:Clippy',
|
|
||||||
'//gerrit-gwtexpui:GlobalKey',
|
|
||||||
'//gerrit-gwtexpui:Progress',
|
|
||||||
'//gerrit-gwtexpui:SafeHtml',
|
|
||||||
'//gerrit-gwtexpui:UserAgent',
|
|
||||||
]
|
|
||||||
DEPS = ['//lib/gwt:user']
|
|
||||||
SRC = 'src/main/java/com/google/gerrit/'
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'client',
|
|
||||||
srcs = glob([SRC + 'client/**/*.java']),
|
|
||||||
gwt_xml = SRC + 'GerritGwtUICommon.gwt.xml',
|
|
||||||
resources = glob(['src/main/**/*']),
|
|
||||||
exported_deps = EXPORTED_DEPS,
|
|
||||||
provided_deps = DEPS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'client-lib',
|
|
||||||
srcs = glob(['src/main/**/*.java']),
|
|
||||||
resources = glob(['src/main/**/*']),
|
|
||||||
exported_deps = EXPORTED_DEPS,
|
|
||||||
provided_deps = DEPS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'client-src-lib',
|
|
||||||
srcs = [],
|
|
||||||
resources = glob(['src/main/**/*']),
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'diffy_logo',
|
|
||||||
resources = glob(['src/main/resources/com/google/gerrit/client/diffy*.png']),
|
|
||||||
deps = [
|
|
||||||
'//lib:LICENSE-diffy',
|
|
||||||
'//lib:LICENSE-CC-BY3.0-unported',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'client_tests',
|
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':client',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib/gwt:user',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
],
|
|
||||||
vm_args = ['-Xmx512m'],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,66 +0,0 @@
|
||||||
include_defs('//gerrit-gwtui/gwt.defs')
|
|
||||||
include_defs('//tools/gwt-constants.defs')
|
|
||||||
|
|
||||||
DEPS = GWT_TRANSITIVE_DEPS + [
|
|
||||||
'//gerrit-gwtexpui:CSS',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib/gwt:dev',
|
|
||||||
]
|
|
||||||
|
|
||||||
gwt_genrule(MODULE, DEPS)
|
|
||||||
gwt_genrule(MODULE, DEPS, '_r')
|
|
||||||
|
|
||||||
gwt_user_agent_permutations(
|
|
||||||
name = 'ui',
|
|
||||||
module_name = 'gerrit_ui',
|
|
||||||
modules = [MODULE],
|
|
||||||
module_deps = [':ui_module'],
|
|
||||||
deps = DEPS,
|
|
||||||
visibility = ['//:'],
|
|
||||||
)
|
|
||||||
|
|
||||||
def gen_ui_module(name, suffix = ""):
|
|
||||||
gwt_module(
|
|
||||||
name = name + suffix,
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
gwt_xml = 'src/main/java/%s.gwt.xml' % MODULE.replace('.', '/'),
|
|
||||||
resources = glob(['src/main/java/**/*']),
|
|
||||||
deps = [
|
|
||||||
':silk_icons',
|
|
||||||
'//gerrit-gwtui-common:diffy_logo',
|
|
||||||
'//gerrit-gwtui-common:client',
|
|
||||||
'//gerrit-gwtexpui:CSS',
|
|
||||||
'//lib/codemirror:codemirror' + suffix,
|
|
||||||
'//lib/gwt:user',
|
|
||||||
],
|
|
||||||
visibility = [
|
|
||||||
'//tools/eclipse:classpath',
|
|
||||||
'//Documentation:licenses.txt',
|
|
||||||
'//Documentation:js_licenses.txt',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
gen_ui_module(name = 'ui_module')
|
|
||||||
gen_ui_module(name = 'ui_module', suffix = '_r')
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'silk_icons',
|
|
||||||
deps = [
|
|
||||||
'//lib:LICENSE-silk_icons',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'ui_tests',
|
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':ui_module',
|
|
||||||
'//gerrit-common:client',
|
|
||||||
'//gerrit-extension-api:client',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib/gwt:dev',
|
|
||||||
'//lib/gwt:user',
|
|
||||||
],
|
|
||||||
vm_args = ['-Xmx512m'],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,141 +0,0 @@
|
||||||
# Copyright (C) 2013 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 multiprocessing import cpu_count
|
|
||||||
|
|
||||||
BROWSERS = [
|
|
||||||
'chrome',
|
|
||||||
'firefox',
|
|
||||||
'gecko1_8',
|
|
||||||
'safari',
|
|
||||||
'msie', 'ie8', 'ie9', 'ie10',
|
|
||||||
'edge',
|
|
||||||
]
|
|
||||||
ALIASES = {
|
|
||||||
'chrome': 'safari',
|
|
||||||
'firefox': 'gecko1_8',
|
|
||||||
'msie': 'ie10',
|
|
||||||
'edge': 'gecko1_8',
|
|
||||||
}
|
|
||||||
MODULE = 'com.google.gerrit.GerritGwtUI'
|
|
||||||
CPU_COUNT = cpu_count()
|
|
||||||
|
|
||||||
def gwt_genrule(module, deps, suffix = ""):
|
|
||||||
dbg = 'ui_dbg' + suffix
|
|
||||||
opt = 'ui_opt' + suffix
|
|
||||||
soyc = 'ui_soyc' + suffix
|
|
||||||
module_dep = ':ui_module' + suffix
|
|
||||||
args = GWT_COMPILER_ARGS_RELEASE_MODE if suffix == "_r" else GWT_COMPILER_ARGS
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'ui_optdbg' + suffix,
|
|
||||||
cmd = 'cd $TMP;' +
|
|
||||||
'unzip -q $(location :%s);' % dbg +
|
|
||||||
'mv' +
|
|
||||||
' gerrit_ui/gerrit_ui.nocache.js' +
|
|
||||||
' gerrit_ui/dbg_gerrit_ui.nocache.js;' +
|
|
||||||
'unzip -qo $(location :%s);' % opt +
|
|
||||||
'mkdir -p \$(dirname $OUT);' +
|
|
||||||
'zip -qr $OUT .',
|
|
||||||
out = 'ui_optdbg' + suffix + '.zip',
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_binary(
|
|
||||||
name = opt,
|
|
||||||
modules = [module],
|
|
||||||
module_deps = [module_dep],
|
|
||||||
deps = deps + ([':' + dbg] if CPU_COUNT < 8 else []),
|
|
||||||
local_workers = CPU_COUNT,
|
|
||||||
strict = True,
|
|
||||||
experimental_args = args,
|
|
||||||
vm_args = GWT_JVM_ARGS,
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_binary(
|
|
||||||
name = dbg,
|
|
||||||
modules = [module],
|
|
||||||
style = 'PRETTY',
|
|
||||||
optimize = 0,
|
|
||||||
module_deps = [module_dep],
|
|
||||||
deps = deps,
|
|
||||||
local_workers = CPU_COUNT,
|
|
||||||
strict = True,
|
|
||||||
experimental_args = args,
|
|
||||||
vm_args = GWT_JVM_ARGS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_binary(
|
|
||||||
name = soyc,
|
|
||||||
modules = [module],
|
|
||||||
module_deps = [module_dep],
|
|
||||||
deps = deps + [':' + dbg],
|
|
||||||
local_workers = CPU_COUNT,
|
|
||||||
strict = True,
|
|
||||||
experimental_args = args + ['-compileReport'],
|
|
||||||
vm_args = GWT_JVM_ARGS,
|
|
||||||
)
|
|
||||||
|
|
||||||
def gwt_user_agent_permutations(
|
|
||||||
name,
|
|
||||||
module_name,
|
|
||||||
modules,
|
|
||||||
style = 'PRETTY',
|
|
||||||
optimize = 0,
|
|
||||||
draft_compile = True,
|
|
||||||
module_deps = [],
|
|
||||||
deps = [],
|
|
||||||
browsers = BROWSERS,
|
|
||||||
visibility = []):
|
|
||||||
for ua in browsers:
|
|
||||||
impl = ua
|
|
||||||
if ua in ALIASES:
|
|
||||||
impl = ALIASES[ua]
|
|
||||||
xml = ''.join([
|
|
||||||
"<module rename-to='%s'>" % module_name,
|
|
||||||
"<inherits name='%s'/>" % modules[0],
|
|
||||||
"<set-property name='user.agent' value='%s'/>" % impl,
|
|
||||||
"<set-property name='locale' value='default'/>",
|
|
||||||
"</module>",
|
|
||||||
])
|
|
||||||
gwt = '%s_%s.gwt.xml' % (modules[0].replace('.', '/'), ua)
|
|
||||||
gwt_name = '%s_%s' % (name, ua)
|
|
||||||
jar = '%s.gwtxml.jar' % (gwt_name)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = '%s_gwtxml_gen' % gwt_name,
|
|
||||||
cmd = 'cd $TMP;' +
|
|
||||||
('mkdir -p \$(dirname %s);' % gwt) +
|
|
||||||
('echo "%s">%s;' % (xml, gwt)) +
|
|
||||||
'zip -qr $OUT .',
|
|
||||||
out = jar,
|
|
||||||
)
|
|
||||||
prebuilt_jar(
|
|
||||||
name = '%s_gwtxml_lib' % gwt_name,
|
|
||||||
binary_jar = ':%s_gwtxml_gen' % gwt_name,
|
|
||||||
)
|
|
||||||
gwt_binary(
|
|
||||||
name = gwt_name,
|
|
||||||
modules = [modules[0] + '_' + ua],
|
|
||||||
style = style,
|
|
||||||
optimize = optimize,
|
|
||||||
draft_compile = draft_compile,
|
|
||||||
module_deps = module_deps + [':%s_gwtxml_lib' % gwt_name],
|
|
||||||
deps = deps,
|
|
||||||
local_workers = CPU_COUNT,
|
|
||||||
strict = True,
|
|
||||||
experimental_args = GWT_COMPILER_ARGS,
|
|
||||||
vm_args = GWT_JVM_ARGS,
|
|
||||||
visibility = visibility,
|
|
||||||
)
|
|
|
@ -1,78 +0,0 @@
|
||||||
SRCS = glob(
|
|
||||||
['src/main/java/**/*.java'],
|
|
||||||
)
|
|
||||||
RESOURCES = glob(['src/main/resources/**/*'])
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'httpd',
|
|
||||||
srcs = SRCS,
|
|
||||||
resources = RESOURCES,
|
|
||||||
deps = [
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gwtexpui:linker_server',
|
|
||||||
'//gerrit-gwtexpui:server',
|
|
||||||
'//gerrit-launcher:launcher',
|
|
||||||
'//gerrit-patch-jgit:server',
|
|
||||||
'//gerrit-prettify:server',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-util-cli:cli',
|
|
||||||
'//gerrit-util-http:http',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:jsch',
|
|
||||||
'//lib:mime-util',
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
'//lib/commons:codec',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/lucene:lucene-core-and-backward-codecs',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_sources(
|
|
||||||
name = 'httpd-src',
|
|
||||||
srcs = SRCS + RESOURCES,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'httpd_tests',
|
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':httpd',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-util-http:http',
|
|
||||||
'//gerrit-util-http:testutil',
|
|
||||||
'//lib:jimfs',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/easymock:easymock',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
],
|
|
||||||
# TODO(sop) Remove after Buck supports Eclipse
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -29,8 +29,8 @@ public class BazelBuild extends BuildSystem {
|
||||||
protected ProcessBuilder newBuildProcess(Label label) throws IOException {
|
protected ProcessBuilder newBuildProcess(Label label) throws IOException {
|
||||||
Properties properties = loadBuildProperties(
|
Properties properties = loadBuildProperties(
|
||||||
sourceRoot.resolve(".primary_build_tool"));
|
sourceRoot.resolve(".primary_build_tool"));
|
||||||
String buck = firstNonNull(properties.getProperty("bazel"), "bazel");
|
String bazel = firstNonNull(properties.getProperty("bazel"), "bazel");
|
||||||
ProcessBuilder proc = new ProcessBuilder(buck, "build", label.fullName());
|
ProcessBuilder proc = new ProcessBuilder(bazel, "build", label.fullName());
|
||||||
if (properties.containsKey("PATH")) {
|
if (properties.containsKey("PATH")) {
|
||||||
proc.environment().put("PATH", properties.getProperty("PATH"));
|
proc.environment().put("PATH", properties.getProperty("PATH"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# NOTE: GerritLauncher must be a single, self-contained class. Do not add any
|
|
||||||
# additional srcs or deps to this rule.
|
|
||||||
java_library(
|
|
||||||
name = 'launcher',
|
|
||||||
srcs = ['src/main/java/com/google/gerrit/launcher/GerritLauncher.java'],
|
|
||||||
visibility = [
|
|
||||||
'//gerrit-acceptance-framework/...',
|
|
||||||
'//gerrit-acceptance-tests/...',
|
|
||||||
'//gerrit-httpd:',
|
|
||||||
'//gerrit-main:main_lib',
|
|
||||||
'//gerrit-pgm:',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -710,8 +710,7 @@ public final class GerritLauncher {
|
||||||
|
|
||||||
// Pop up to the top-level source folder by looking for .buckconfig.
|
// Pop up to the top-level source folder by looking for .buckconfig.
|
||||||
Path dir = Paths.get(u.getPath());
|
Path dir = Paths.get(u.getPath());
|
||||||
while (!Files.isRegularFile(dir.resolve(".buckconfig"))
|
while (!Files.isRegularFile(dir.resolve("WORKSPACE"))) {
|
||||||
&& !Files.isRegularFile(dir.resolve("WORKSPACE"))) {
|
|
||||||
Path parent = dir.getParent();
|
Path parent = dir.getParent();
|
||||||
if (parent == null) {
|
if (parent == null) {
|
||||||
throw new FileNotFoundException("Cannot find source root from " + u);
|
throw new FileNotFoundException("Cannot find source root from " + u);
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
QUERY_BUILDER = [
|
|
||||||
'src/main/java/com/google/gerrit/lucene/QueryBuilder.java',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'query_builder',
|
|
||||||
srcs = QUERY_BUILDER,
|
|
||||||
deps = [
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/lucene:lucene-core-and-backward-codecs',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'lucene',
|
|
||||||
srcs = glob(['src/main/java/**/*.java'], excludes = QUERY_BUILDER),
|
|
||||||
deps = [
|
|
||||||
':query_builder',
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/lucene:lucene-analyzers-common',
|
|
||||||
'//lib/lucene:lucene-core-and-backward-codecs',
|
|
||||||
'//lib/lucene:lucene-misc',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,13 +0,0 @@
|
||||||
java_binary(
|
|
||||||
name = 'main_bin',
|
|
||||||
main_class = 'Main',
|
|
||||||
deps = [':main_lib'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'main_lib',
|
|
||||||
srcs = ['src/main/java/Main.java'],
|
|
||||||
deps = ['//gerrit-launcher:launcher'],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,26 +0,0 @@
|
||||||
SRCS = glob(
|
|
||||||
['src/main/java/**/*.java'],
|
|
||||||
)
|
|
||||||
RESOURCES = glob(['src/main/resources/**/*'])
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'oauth',
|
|
||||||
srcs = SRCS,
|
|
||||||
resources = RESOURCES,
|
|
||||||
deps = [
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-httpd:httpd',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib/commons:codec',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/log:api',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,26 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'openid',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
resources = glob(['src/main/resources/**/*']),
|
|
||||||
deps = [
|
|
||||||
'//lib/openid:consumer',
|
|
||||||
],
|
|
||||||
provided_deps = [
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gwtexpui:server',
|
|
||||||
'//gerrit-httpd:httpd',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
'//lib/commons:codec',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/log:api',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,11 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'commons-net',
|
|
||||||
srcs = glob(['src/main/java/org/apache/commons/net/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-util-ssl:ssl',
|
|
||||||
'//lib/commons:codec',
|
|
||||||
'//lib/commons:net',
|
|
||||||
'//lib/log:api',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,65 +0,0 @@
|
||||||
SRC = 'src/main/java/org/eclipse/jgit/'
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'client',
|
|
||||||
srcs = [
|
|
||||||
SRC + 'diff/Edit_JsonSerializer.java',
|
|
||||||
SRC + 'diff/ReplaceEdit.java',
|
|
||||||
],
|
|
||||||
gwt_xml = SRC + 'JGit.gwt.xml',
|
|
||||||
deps = [
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
':Edit',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib/gwt:user'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'Edit',
|
|
||||||
srcs = [':jgit_edit_src'],
|
|
||||||
deps = [':edit_src'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'edit_src',
|
|
||||||
binary_jar = ':jgit_edit_src',
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'jgit_edit_src',
|
|
||||||
cmd = 'unzip -qd $TMP $(location //lib/jgit/org.eclipse.jgit:jgit_src) ' +
|
|
||||||
'org/eclipse/jgit/diff/Edit.java;' +
|
|
||||||
'cd $TMP;' +
|
|
||||||
'zip -Dq $OUT org/eclipse/jgit/diff/Edit.java',
|
|
||||||
out = 'edit-sources.jar',
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'server',
|
|
||||||
srcs = [
|
|
||||||
SRC + x for x in [
|
|
||||||
'diff/EditDeserializer.java',
|
|
||||||
'diff/ReplaceEdit.java',
|
|
||||||
'internal/storage/file/WindowCacheStatAccessor.java',
|
|
||||||
'lib/ObjectIdSerialization.java',
|
|
||||||
]
|
|
||||||
],
|
|
||||||
deps = [
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'jgit_patch_tests',
|
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':server',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib:junit',
|
|
||||||
],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
185
gerrit-pgm/BUCK
185
gerrit-pgm/BUCK
|
@ -1,185 +0,0 @@
|
||||||
SRCS = 'src/main/java/com/google/gerrit/pgm/'
|
|
||||||
RSRCS = 'src/main/resources/com/google/gerrit/pgm/'
|
|
||||||
|
|
||||||
INIT_API_SRCS = glob([SRCS + 'init/api/*.java'])
|
|
||||||
|
|
||||||
BASE_JETTY_DEPS = [
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gwtexpui:linker_server',
|
|
||||||
'//gerrit-gwtexpui:server',
|
|
||||||
'//gerrit-httpd:httpd',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-sshd:sshd',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
]
|
|
||||||
|
|
||||||
DEPS = BASE_JETTY_DEPS + [
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//lib/log:jsonevent-layout',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'init-api',
|
|
||||||
srcs = INIT_API_SRCS,
|
|
||||||
deps = DEPS + ['//gerrit-common:annotations'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_sources(
|
|
||||||
name = 'init-api-src',
|
|
||||||
srcs = INIT_API_SRCS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'init',
|
|
||||||
srcs = glob([SRCS + 'init/**/*.java']),
|
|
||||||
resources = glob([RSRCS + 'init/*']),
|
|
||||||
deps = DEPS + [
|
|
||||||
':init-api',
|
|
||||||
':util',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-elasticsearch:elasticsearch',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:derby',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:h2',
|
|
||||||
'//lib/commons:validator',
|
|
||||||
'//lib/mina:sshd',
|
|
||||||
],
|
|
||||||
provided_deps = ['//gerrit-launcher:launcher'],
|
|
||||||
visibility = [
|
|
||||||
'//gerrit-acceptance-framework/...',
|
|
||||||
'//gerrit-acceptance-tests/...',
|
|
||||||
'//gerrit-war:',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
REST_UTIL_DEPS = [
|
|
||||||
'//gerrit-cache-h2:cache-h2',
|
|
||||||
'//gerrit-elasticsearch:elasticsearch',
|
|
||||||
'//gerrit-util-cli:cli',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib/commons:dbcp',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'util',
|
|
||||||
deps = DEPS + REST_UTIL_DEPS,
|
|
||||||
exported_deps = [':util-nodep'],
|
|
||||||
visibility = [
|
|
||||||
'//gerrit-acceptance-tests/...',
|
|
||||||
'//gerrit-gwtdebug:gwtdebug',
|
|
||||||
'//gerrit-war:',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'util-nodep',
|
|
||||||
srcs = glob([SRCS + 'util/*.java']),
|
|
||||||
provided_deps = DEPS + REST_UTIL_DEPS,
|
|
||||||
visibility = ['//gerrit-acceptance-framework/...'],
|
|
||||||
)
|
|
||||||
|
|
||||||
JETTY_DEPS = [
|
|
||||||
'//lib/jetty:jmx',
|
|
||||||
'//lib/jetty:server',
|
|
||||||
'//lib/jetty:servlet',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'http',
|
|
||||||
deps = DEPS + JETTY_DEPS,
|
|
||||||
exported_deps = [':http-jetty'],
|
|
||||||
visibility = ['//gerrit-war:'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'http-jetty',
|
|
||||||
srcs = glob([SRCS + 'http/jetty/*.java']),
|
|
||||||
provided_deps = JETTY_DEPS + BASE_JETTY_DEPS + [
|
|
||||||
'//gerrit-launcher:launcher',
|
|
||||||
'//gerrit-reviewdb:client',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
],
|
|
||||||
visibility = ['//gerrit-acceptance-framework/...'],
|
|
||||||
)
|
|
||||||
|
|
||||||
REST_PGM_DEPS = [
|
|
||||||
':http',
|
|
||||||
':init',
|
|
||||||
':init-api',
|
|
||||||
':util',
|
|
||||||
'//gerrit-cache-h2:cache-h2',
|
|
||||||
'//gerrit-elasticsearch:elasticsearch',
|
|
||||||
'//gerrit-gpg:gpg',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//gerrit-oauth:oauth',
|
|
||||||
'//gerrit-openid:openid',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:protobuf',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
'//lib/prolog:cafeteria',
|
|
||||||
'//lib/prolog:compiler',
|
|
||||||
'//lib/prolog:runtime',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'pgm',
|
|
||||||
resources = glob([RSRCS + '*']),
|
|
||||||
deps = DEPS + REST_PGM_DEPS + [
|
|
||||||
':daemon',
|
|
||||||
],
|
|
||||||
visibility = [
|
|
||||||
'//:',
|
|
||||||
'//gerrit-acceptance-tests/...',
|
|
||||||
'//gerrit-gwtdebug:gwtdebug',
|
|
||||||
'//tools/eclipse:classpath',
|
|
||||||
'//Documentation:licenses.txt',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
# no transitive deps, used for gerrit-acceptance-framework
|
|
||||||
java_library(
|
|
||||||
name = 'daemon',
|
|
||||||
srcs = glob([SRCS + '*.java', SRCS + 'rules/*.java']),
|
|
||||||
resources = glob([RSRCS + '*']),
|
|
||||||
deps = ['//lib/auto:auto-value'],
|
|
||||||
provided_deps = DEPS + REST_PGM_DEPS + [
|
|
||||||
'//gerrit-launcher:launcher',
|
|
||||||
],
|
|
||||||
visibility = [
|
|
||||||
'//gerrit-acceptance-framework/...',
|
|
||||||
'//gerrit-gwtdebug:gwtdebug',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'pgm_tests',
|
|
||||||
srcs = glob(['src/test/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':init',
|
|
||||||
':init-api',
|
|
||||||
':pgm',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib/easymock:easymock',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,99 +0,0 @@
|
||||||
SRCS = [
|
|
||||||
'gerrit-server/src/main/java/',
|
|
||||||
'gerrit-httpd/src/main/java/',
|
|
||||||
'gerrit-sshd/src/main/java/',
|
|
||||||
]
|
|
||||||
|
|
||||||
PLUGIN_API = [
|
|
||||||
'//gerrit-httpd:httpd',
|
|
||||||
'//gerrit-pgm:init-api',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-sshd:sshd',
|
|
||||||
]
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'plugin-api',
|
|
||||||
merge_manifests = False,
|
|
||||||
manifest_file = ':manifest',
|
|
||||||
deps = [':lib'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'manifest',
|
|
||||||
cmd = 'echo "Manifest-Version: 1.0" >$OUT;' +
|
|
||||||
'echo "Implementation-Title: Gerrit Plugin API" >>$OUT;' +
|
|
||||||
'echo "Implementation-Vendor: Gerrit Code Review Project" >>$OUT',
|
|
||||||
out = 'manifest.txt',
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'lib',
|
|
||||||
exported_deps = PLUGIN_API + [
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-antlr:query_parser',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gwtexpui:server',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:blame-cache',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:icu4j',
|
|
||||||
'//lib:jsch',
|
|
||||||
'//lib:jsr305',
|
|
||||||
'//lib:mime-util',
|
|
||||||
'//lib:protobuf',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
'//lib:soy',
|
|
||||||
'//lib:velocity',
|
|
||||||
'//lib/commons:lang',
|
|
||||||
'//lib/dropwizard:dropwizard-core',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:javax-inject',
|
|
||||||
'//lib/guice:multibindings',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
"//lib/httpcomponents:httpclient",
|
|
||||||
"//lib/httpcomponents:httpcore",
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
'//lib/mina:sshd',
|
|
||||||
'//lib/ow2:ow2-asm',
|
|
||||||
'//lib/ow2:ow2-asm-analysis',
|
|
||||||
'//lib/ow2:ow2-asm-commons',
|
|
||||||
'//lib/ow2:ow2-asm-util',
|
|
||||||
'//lib/prolog:compiler',
|
|
||||||
'//lib/prolog:runtime',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'plugin-api-src',
|
|
||||||
deps = [
|
|
||||||
'//gerrit-extension-api:extension-api-src',
|
|
||||||
] + [d + '-src' for d in PLUGIN_API],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_doc(
|
|
||||||
name = 'plugin-api-javadoc',
|
|
||||||
title = 'Gerrit Review Plugin API Documentation',
|
|
||||||
pkgs = ['com.google.gerrit'],
|
|
||||||
source_jar = ':plugin-api-src',
|
|
||||||
srcs = glob([n + '**/*.java' for n in SRCS]),
|
|
||||||
deps = [
|
|
||||||
':plugin-api',
|
|
||||||
'//lib/bouncycastle:bcprov',
|
|
||||||
'//lib/bouncycastle:bcpg',
|
|
||||||
'//lib/bouncycastle:bcpkix',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,60 +0,0 @@
|
||||||
SRCS = glob(['src/main/java/com/google/gerrit/**/*.java'])
|
|
||||||
DEPS = ['//lib/gwt:user']
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'gwtui-api',
|
|
||||||
deps = [
|
|
||||||
':gwtui-api-lib',
|
|
||||||
'//gerrit-gwtui-common:client-lib',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'gwtui-api-lib',
|
|
||||||
srcs = SRCS,
|
|
||||||
resources = glob(['src/main/**/*']),
|
|
||||||
exported_deps = ['//gerrit-gwtui-common:client-lib'],
|
|
||||||
provided_deps = DEPS + ['//lib/gwt:dev'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'gwtui-api-src',
|
|
||||||
deps = [
|
|
||||||
':gwtui-api-src-lib',
|
|
||||||
'//gerrit-gwtexpui:client-src-lib',
|
|
||||||
'//gerrit-gwtui-common:client-src-lib',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'gwtui-api-src-lib',
|
|
||||||
srcs = [],
|
|
||||||
resources = glob(['src/main/**/*']),
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_doc(
|
|
||||||
name = 'gwtui-api-javadoc',
|
|
||||||
title = 'Gerrit Review GWT Extension API Documentation',
|
|
||||||
pkgs = [
|
|
||||||
'com.google.gerrit',
|
|
||||||
'com.google.gwtexpui.clippy',
|
|
||||||
'com.google.gwtexpui.globalkey',
|
|
||||||
'com.google.gwtexpui.safehtml',
|
|
||||||
'com.google.gwtexpui.user',
|
|
||||||
],
|
|
||||||
source_jar = ':gwtui-api-src',
|
|
||||||
srcs = SRCS,
|
|
||||||
deps = DEPS + [
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib:gwtorm_client',
|
|
||||||
'//lib/gwt:dev',
|
|
||||||
'//gerrit-gwtui-common:client-lib',
|
|
||||||
'//gerrit-common:client',
|
|
||||||
'//gerrit-reviewdb:client',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,47 +0,0 @@
|
||||||
SRC = 'src/main/java/com/google/gerrit/prettify/'
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'client',
|
|
||||||
srcs = glob([
|
|
||||||
SRC + 'common/**/*.java',
|
|
||||||
]),
|
|
||||||
gwt_xml = SRC + 'PrettyFormatter.gwt.xml',
|
|
||||||
deps = [
|
|
||||||
'//gerrit-gwtexpui:SafeHtml',
|
|
||||||
],
|
|
||||||
exported_deps = [
|
|
||||||
'//gerrit-extension-api:client',
|
|
||||||
'//gerrit-patch-jgit:client',
|
|
||||||
'//gerrit-patch-jgit:Edit',
|
|
||||||
'//gerrit-reviewdb:client',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib:gwtjsonrpc_src',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib/gwt:user'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'server',
|
|
||||||
srcs = glob([SRC + 'common/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-patch-jgit:server',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
export_file(
|
|
||||||
name = 'prettify.min.js',
|
|
||||||
src = 'src/main/resources/com/google/gerrit/prettify/client/prettify.js',
|
|
||||||
visibility = ['//Documentation:'],
|
|
||||||
)
|
|
||||||
|
|
||||||
export_file(
|
|
||||||
name = 'prettify.min.css',
|
|
||||||
src = 'src/main/resources/com/google/gerrit/prettify/client/prettify.css',
|
|
||||||
visibility = ['//Documentation:'],
|
|
||||||
)
|
|
|
@ -1,38 +0,0 @@
|
||||||
SRC = 'src/main/java/com/google/gerrit/reviewdb/'
|
|
||||||
TESTS = 'src/test/java/com/google/gerrit/reviewdb/'
|
|
||||||
|
|
||||||
gwt_module(
|
|
||||||
name = 'client',
|
|
||||||
srcs = glob([SRC + 'client/**/*.java']),
|
|
||||||
gwt_xml = SRC + 'ReviewDB.gwt.xml',
|
|
||||||
deps = [
|
|
||||||
'//gerrit-extension-api:client',
|
|
||||||
'//lib:gwtorm_client',
|
|
||||||
'//lib:gwtorm_client_src'
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'server',
|
|
||||||
srcs = glob([SRC + '**/*.java']),
|
|
||||||
resources = glob(['src/main/resources/**/*']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'client_tests',
|
|
||||||
srcs = glob([TESTS + 'client/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
':client',
|
|
||||||
'//gerrit-server:testutil',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:truth',
|
|
||||||
],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,216 +0,0 @@
|
||||||
CONSTANTS_SRC = [
|
|
||||||
'src/main/java/com/google/gerrit/server/documentation/Constants.java',
|
|
||||||
]
|
|
||||||
|
|
||||||
SRCS = glob(
|
|
||||||
['src/main/java/**/*.java'],
|
|
||||||
excludes = CONSTANTS_SRC,
|
|
||||||
)
|
|
||||||
RESOURCES = glob(['src/main/resources/**/*'])
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'constants',
|
|
||||||
srcs = CONSTANTS_SRC,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
# TODO(sop) break up gerrit-server java_library(), its too big
|
|
||||||
java_library(
|
|
||||||
name = 'server',
|
|
||||||
srcs = SRCS,
|
|
||||||
resources = RESOURCES,
|
|
||||||
deps = [
|
|
||||||
':constants',
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-antlr:query_parser',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-patch-commonsnet:commons-net',
|
|
||||||
'//gerrit-patch-jgit:server',
|
|
||||||
'//gerrit-prettify:server',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-util-cli:cli',
|
|
||||||
'//gerrit-util-ssl:ssl',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:automaton',
|
|
||||||
'//lib:blame-cache',
|
|
||||||
'//lib:grappa',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:guava-retrying',
|
|
||||||
'//lib:gwtjsonrpc',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:jsch',
|
|
||||||
'//lib:juniversalchardet',
|
|
||||||
'//lib:mime-util',
|
|
||||||
'//lib:pegdown',
|
|
||||||
'//lib:protobuf',
|
|
||||||
'//lib:soy',
|
|
||||||
'//lib:tukaani-xz',
|
|
||||||
'//lib:velocity',
|
|
||||||
'//lib/antlr:java_runtime',
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
'//lib/commons:codec',
|
|
||||||
'//lib/commons:compress',
|
|
||||||
'//lib/commons:dbcp',
|
|
||||||
'//lib/commons:lang',
|
|
||||||
'//lib/commons:net',
|
|
||||||
'//lib/commons:validator',
|
|
||||||
'//lib/dropwizard:dropwizard-core',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.archive:jgit-archive',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/jsoup:jsoup',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/log:jsonevent-layout',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
'//lib/lucene:lucene-analyzers-common',
|
|
||||||
'//lib/lucene:lucene-core-and-backward-codecs',
|
|
||||||
'//lib/lucene:lucene-queryparser',
|
|
||||||
'//lib/mime4j:core',
|
|
||||||
'//lib/mime4j:dom',
|
|
||||||
'//lib/ow2:ow2-asm',
|
|
||||||
'//lib/ow2:ow2-asm-tree',
|
|
||||||
'//lib/ow2:ow2-asm-util',
|
|
||||||
'//lib/prolog:runtime',
|
|
||||||
],
|
|
||||||
provided_deps = [
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_sources(
|
|
||||||
name = 'server-src',
|
|
||||||
srcs = SRCS + RESOURCES,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
TESTUTIL_DEPS = [
|
|
||||||
':server',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-cache-h2:cache-h2',
|
|
||||||
'//gerrit-elasticsearch:elasticsearch',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gpg:gpg',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:h2',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/log:impl_log4j',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
]
|
|
||||||
|
|
||||||
TESTUTIL = glob([
|
|
||||||
'src/test/java/com/google/gerrit/testutil/**/*.java',
|
|
||||||
'src/test/java/com/google/gerrit/server/project/Util.java',
|
|
||||||
])
|
|
||||||
java_library(
|
|
||||||
name = 'testutil',
|
|
||||||
srcs = TESTUTIL,
|
|
||||||
deps = [
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
],
|
|
||||||
provided_deps = TESTUTIL_DEPS,
|
|
||||||
exported_deps = [
|
|
||||||
'//lib/easymock:easymock',
|
|
||||||
'//lib/powermock:powermock-api-easymock',
|
|
||||||
'//lib/powermock:powermock-api-support',
|
|
||||||
'//lib/powermock:powermock-core',
|
|
||||||
'//lib/powermock:powermock-module-junit4',
|
|
||||||
'//lib/powermock:powermock-module-junit4-common',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
PROLOG_TEST_CASE = [
|
|
||||||
'src/test/java/com/google/gerrit/rules/PrologTestCase.java',
|
|
||||||
]
|
|
||||||
PROLOG_TESTS = glob(
|
|
||||||
['src/test/java/com/google/gerrit/rules/**/*.java'],
|
|
||||||
excludes = PROLOG_TEST_CASE,
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'prolog_test_case',
|
|
||||||
srcs = PROLOG_TEST_CASE,
|
|
||||||
deps = [
|
|
||||||
':server',
|
|
||||||
':testutil',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/prolog:runtime',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'prolog_tests',
|
|
||||||
srcs = PROLOG_TESTS,
|
|
||||||
resources = glob(['src/test/resources/com/google/gerrit/rules/**/*']),
|
|
||||||
deps = TESTUTIL_DEPS + [
|
|
||||||
':prolog_test_case',
|
|
||||||
':testutil',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
|
||||||
'//lib/prolog:runtime',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
QUERY_TESTS = glob(
|
|
||||||
['src/test/java/com/google/gerrit/server/query/**/*.java'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'query_tests',
|
|
||||||
srcs = QUERY_TESTS,
|
|
||||||
deps = TESTUTIL_DEPS + [
|
|
||||||
':testutil',
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-antlr:query_parser',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
|
||||||
'//lib/antlr:java_runtime',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'server_tests',
|
|
||||||
labels = ['server'],
|
|
||||||
srcs = glob(
|
|
||||||
['src/test/java/**/*.java'],
|
|
||||||
excludes = TESTUTIL + PROLOG_TESTS + PROLOG_TEST_CASE + QUERY_TESTS
|
|
||||||
),
|
|
||||||
resources = glob(['src/test/resources/com/google/gerrit/server/mail/*']),
|
|
||||||
deps = TESTUTIL_DEPS + [
|
|
||||||
':testutil',
|
|
||||||
'//gerrit-antlr:query_exception',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-patch-jgit:server',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:grappa',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:guava-retrying',
|
|
||||||
'//lib:protobuf',
|
|
||||||
'//lib/dropwizard:dropwizard-core',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/prolog:runtime',
|
|
||||||
],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,8 +0,0 @@
|
||||||
include_defs('//lib/prolog/prolog.defs')
|
|
||||||
|
|
||||||
prolog_cafe_library(
|
|
||||||
name = 'common',
|
|
||||||
srcs = ['gerrit_common.pl'],
|
|
||||||
deps = ['//gerrit-server:server'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,59 +0,0 @@
|
||||||
SRCS = glob(['src/main/java/**/*.java'])
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'sshd',
|
|
||||||
srcs = SRCS,
|
|
||||||
deps = [
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-cache-h2:cache-h2',
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//gerrit-patch-jgit:server',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-util-cli:cli',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:gson',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib:jsch',
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
'//lib/commons:codec',
|
|
||||||
'//lib/dropwizard:dropwizard-core',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:guice-servlet', # SSH should not depend on servlet
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/jgit/org.eclipse.jgit.archive:jgit-archive',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/log:log4j',
|
|
||||||
'//lib/mina:core',
|
|
||||||
'//lib/mina:sshd',
|
|
||||||
],
|
|
||||||
provided_deps = [
|
|
||||||
'//lib/bouncycastle:bcprov',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_sources(
|
|
||||||
name = 'sshd-src',
|
|
||||||
srcs = SRCS,
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'sshd_tests',
|
|
||||||
srcs = glob(
|
|
||||||
['src/test/java/**/*.java'],
|
|
||||||
),
|
|
||||||
deps = [
|
|
||||||
':sshd',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/mina:sshd',
|
|
||||||
],
|
|
||||||
)
|
|
|
@ -1,13 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'cli',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-common:annotations',
|
|
||||||
'//gerrit-common:server',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,39 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'http',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
TESTUTIL_SRCS = glob(['src/test/**/testutil/**/*.java'])
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'testutil',
|
|
||||||
srcs = TESTUTIL_SRCS,
|
|
||||||
deps = [
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
'//lib/httpcomponents:httpclient',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_test(
|
|
||||||
name = 'http_tests',
|
|
||||||
srcs = glob(
|
|
||||||
['src/test/java/**/*.java'],
|
|
||||||
excludes = TESTUTIL_SRCS,
|
|
||||||
),
|
|
||||||
deps = [
|
|
||||||
':http',
|
|
||||||
':testutil',
|
|
||||||
'//lib:junit',
|
|
||||||
'//lib:servlet-api-3_1',
|
|
||||||
'//lib:truth',
|
|
||||||
'//lib/easymock:easymock',
|
|
||||||
],
|
|
||||||
# TODO(sop) Remove after Buck supports Eclipse
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
|
@ -1,5 +0,0 @@
|
||||||
java_library(
|
|
||||||
name = 'ssl',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,77 +0,0 @@
|
||||||
include_defs('//tools/git.defs')
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'init',
|
|
||||||
srcs = glob(['src/main/java/**/*.java']),
|
|
||||||
deps = [
|
|
||||||
'//gerrit-cache-h2:cache-h2',
|
|
||||||
'//gerrit-elasticsearch:elasticsearch',
|
|
||||||
'//gerrit-extension-api:api',
|
|
||||||
'//gerrit-gpg:gpg',
|
|
||||||
'//gerrit-httpd:httpd',
|
|
||||||
'//gerrit-lucene:lucene',
|
|
||||||
'//gerrit-oauth:oauth',
|
|
||||||
'//gerrit-openid:openid',
|
|
||||||
'//gerrit-pgm:http',
|
|
||||||
'//gerrit-pgm:init',
|
|
||||||
'//gerrit-pgm:init-api',
|
|
||||||
'//gerrit-pgm:util',
|
|
||||||
'//gerrit-reviewdb:server',
|
|
||||||
'//gerrit-server:server',
|
|
||||||
'//gerrit-server/src/main/prolog:common',
|
|
||||||
'//gerrit-sshd:sshd',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib:gwtorm',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-servlet',
|
|
||||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
|
||||||
'//lib/log:api',
|
|
||||||
],
|
|
||||||
provided_deps = ['//lib:servlet-api-3_1'],
|
|
||||||
visibility = [
|
|
||||||
'//:',
|
|
||||||
'//gerrit-gwtdebug:gwtdebug',
|
|
||||||
'//tools/eclipse:classpath',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'webapp_assets',
|
|
||||||
cmd = 'cd src/main/webapp; zip -qr $OUT .',
|
|
||||||
srcs = glob(['src/main/webapp/**/*']),
|
|
||||||
out = 'webapp_assets.zip',
|
|
||||||
visibility = ['//:'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'log4j-config__jar',
|
|
||||||
cmd = 'jar cf $OUT -C src/main/resources .',
|
|
||||||
srcs = ['src/main/resources/log4j.properties'],
|
|
||||||
out = 'log4j-config.jar',
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'log4j-config',
|
|
||||||
binary_jar = ':log4j-config__jar',
|
|
||||||
visibility = [
|
|
||||||
'//:',
|
|
||||||
'//tools/eclipse:classpath',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'version',
|
|
||||||
binary_jar = ':gen_version',
|
|
||||||
visibility = ['//:'],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = 'gen_version',
|
|
||||||
cmd = ';'.join([
|
|
||||||
'cd $TMP',
|
|
||||||
'mkdir -p com/google/gerrit/common',
|
|
||||||
'echo "%s" >com/google/gerrit/common/Version' % git_describe(),
|
|
||||||
'zip -9Dqr $OUT .',
|
|
||||||
]),
|
|
||||||
out = 'version.jar',
|
|
||||||
)
|
|
319
lib/BUCK
319
lib/BUCK
|
@ -1,319 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
include_defs('//lib/GUAVA_VERSION')
|
|
||||||
|
|
||||||
define_license(name = 'antlr')
|
|
||||||
define_license(name = 'Apache1.1')
|
|
||||||
define_license(name = 'Apache2.0')
|
|
||||||
define_license(name = 'args4j')
|
|
||||||
define_license(name = 'asciidoctor')
|
|
||||||
define_license(name = 'automaton')
|
|
||||||
define_license(name = 'bouncycastle')
|
|
||||||
define_license(name = 'CC-BY3.0-unported')
|
|
||||||
define_license(name = 'clippy')
|
|
||||||
define_license(name = 'codemirror-minified')
|
|
||||||
define_license(name = 'codemirror-original')
|
|
||||||
define_license(name = 'diffy')
|
|
||||||
define_license(name = 'es6-promise')
|
|
||||||
define_license(name = 'fetch')
|
|
||||||
define_license(name = 'h2')
|
|
||||||
define_license(name = 'highlightjs')
|
|
||||||
define_license(name = 'icu4j')
|
|
||||||
define_license(name = 'jgit')
|
|
||||||
define_license(name = 'jsch')
|
|
||||||
define_license(name = 'jsoup')
|
|
||||||
define_license(name = 'MPL1.1')
|
|
||||||
define_license(name = 'moment')
|
|
||||||
define_license(name = 'OFL1.1')
|
|
||||||
define_license(name = 'ow2')
|
|
||||||
define_license(name = 'page.js')
|
|
||||||
define_license(name = 'polymer')
|
|
||||||
define_license(name = 'postgresql')
|
|
||||||
define_license(name = 'prologcafe')
|
|
||||||
define_license(name = 'promise-polyfill')
|
|
||||||
define_license(name = 'protobuf')
|
|
||||||
define_license(name = 'PublicDomain')
|
|
||||||
define_license(name = 'silk_icons')
|
|
||||||
define_license(name = 'slf4j')
|
|
||||||
define_license(name = 'xz')
|
|
||||||
|
|
||||||
define_license(name = 'DO_NOT_DISTRIBUTE')
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'gwtorm_client',
|
|
||||||
id = 'com.google.gerrit:gwtorm:1.17',
|
|
||||||
bin_sha1 = "97bdc872f00388910c9af70771f07bbb32f1b949",
|
|
||||||
src_sha1 = "889e35d7295b1af49161a28daaea9905ffa76a63",
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'gwtorm',
|
|
||||||
exported_deps = [':gwtorm_client'],
|
|
||||||
deps = [':protobuf'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'gwtjsonrpc',
|
|
||||||
id = 'com.google.gerrit:gwtjsonrpc:1.11',
|
|
||||||
bin_sha1 = '0990e7eec9eec3a15661edcf9232acbac4aeacec',
|
|
||||||
src_sha1 = 'a682afc46284fb58197a173cb5818770a1e7834a',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'gson',
|
|
||||||
id = 'com.google.code.gson:gson:2.7',
|
|
||||||
sha1 = '751f548c85fa49f330cecbb1875893f971b33c4e',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'guava',
|
|
||||||
id = 'com.google.guava:guava:' + GUAVA_VERSION,
|
|
||||||
sha1 = GUAVA_BIN_SHA1,
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'guava-retrying',
|
|
||||||
id = 'com.github.rholder:guava-retrying:2.0.0',
|
|
||||||
sha1 = '974bc0a04a11cc4806f7c20a34703bd23c34e7f4',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [':jsr305'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jsr305',
|
|
||||||
id = 'com.google.code.findbugs:jsr305:3.0.1',
|
|
||||||
sha1 = 'f7be08ec23c21485b9b5a1cf1654c2ec8c58168d',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
attach_source = False,
|
|
||||||
# Whitelist lib targets that have jsr305 as a dependency. Generally speaking
|
|
||||||
# Gerrit core should not depend on these annotations, and instead use
|
|
||||||
# equivalent annotations in com.google.gerrit.common.
|
|
||||||
visibility = [
|
|
||||||
'//gerrit-plugin-api:lib',
|
|
||||||
'//lib:guava-retrying',
|
|
||||||
'//lib:soy',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'velocity',
|
|
||||||
id = 'org.apache.velocity:velocity:1.7',
|
|
||||||
sha1 = '2ceb567b8f3f21118ecdec129fe1271dbc09aa7a',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [
|
|
||||||
'//lib/commons:collections',
|
|
||||||
'//lib/commons:lang',
|
|
||||||
'//lib/commons:oro',
|
|
||||||
],
|
|
||||||
exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jsch',
|
|
||||||
id = 'com.jcraft:jsch:0.1.54',
|
|
||||||
sha1 = 'da3584329a263616e277e15462b387addd1b208d',
|
|
||||||
license = 'jsch',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'servlet-api-3_1',
|
|
||||||
id = 'org.apache.tomcat:tomcat-servlet-api:8.0.24',
|
|
||||||
sha1 = '5d9e2e895e3111622720157d0aa540066d5fce3a',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
exclude = ['META-INF/NOTICE', 'META-INF/LICENSE'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'args4j',
|
|
||||||
id = 'args4j:args4j:2.0.26',
|
|
||||||
sha1 = '01ebb18ebb3b379a74207d5af4ea7c8338ebd78b',
|
|
||||||
license = 'args4j',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'mime-util',
|
|
||||||
id = 'eu.medsea.mimeutil:mime-util:2.1.3',
|
|
||||||
sha1 = '0c9cfae15c74f62491d4f28def0dff1dabe52a47',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
exclude = ['LICENSE.txt', 'README.txt'],
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'juniversalchardet',
|
|
||||||
id = 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3',
|
|
||||||
sha1 = 'cd49678784c46aa8789c060538e0154013bb421b',
|
|
||||||
license = 'MPL1.1',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'automaton',
|
|
||||||
id = 'dk.brics.automaton:automaton:1.11-8',
|
|
||||||
sha1 = '6ebfa65eb431ff4b715a23be7a750cbc4cc96d0f',
|
|
||||||
license = 'automaton',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'pegdown',
|
|
||||||
id = 'org.pegdown:pegdown:1.4.2',
|
|
||||||
sha1 = 'd96db502ed832df867ff5d918f05b51ba3879ea7',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [':grappa'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'grappa',
|
|
||||||
id = 'com.github.parboiled1:grappa:1.0.4',
|
|
||||||
sha1 = 'ad4b44b9c305dad7aa1e680d4b5c8eec9c4fd6f5',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [
|
|
||||||
':jitescript',
|
|
||||||
'//lib/ow2:ow2-asm',
|
|
||||||
'//lib/ow2:ow2-asm-analysis',
|
|
||||||
'//lib/ow2:ow2-asm-tree',
|
|
||||||
'//lib/ow2:ow2-asm-util',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jitescript',
|
|
||||||
id = 'me.qmx.jitescript:jitescript:0.4.0',
|
|
||||||
sha1 = '2e35862b0435c1b027a21f3d6eecbe50e6e08d54',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
visibility = ['//lib:grappa'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'derby',
|
|
||||||
id = 'org.apache.derby:derby:10.11.1.1',
|
|
||||||
sha1 = 'df4b50061e8e4c348ce243b921f53ee63ba9bbe1',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'h2',
|
|
||||||
id = 'com.h2database:h2:1.3.176',
|
|
||||||
sha1 = 'fd369423346b2f1525c413e33f8cf95b09c92cbd',
|
|
||||||
license = 'h2',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'postgresql',
|
|
||||||
id = 'org.postgresql:postgresql:9.4.1211.jre7',
|
|
||||||
sha1 = '56b01e9e667f408818a6ef06a89598dbab80687d',
|
|
||||||
license = 'postgresql',
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'protobuf',
|
|
||||||
# Must match version in gwtorm/pom.xml.
|
|
||||||
id = 'com.google.protobuf:protobuf-java:2.5.0',
|
|
||||||
bin_sha1 = 'a10732c76bfacdbd633a7eb0f7968b1059a65dfa',
|
|
||||||
src_sha1 = '7a27a7fc815e481b367ead5df19b4a71ace4a419',
|
|
||||||
license = 'protobuf',
|
|
||||||
)
|
|
||||||
|
|
||||||
# Test-only dependencies below.
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jimfs',
|
|
||||||
id = 'com.google.jimfs:jimfs:1.1',
|
|
||||||
sha1 = '8fbd0579dc68aba6186935cc1bee21d2f3e7ec1c',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
deps = [':guava'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'junit',
|
|
||||||
id = 'junit:junit:4.11',
|
|
||||||
sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
exported_deps = [':hamcrest-core'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'hamcrest-core',
|
|
||||||
id = 'org.hamcrest:hamcrest-core:1.3',
|
|
||||||
sha1 = '42a25dc3219429f0e5d060061f71acb49bf010a0',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
visibility = ['//lib:junit'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'truth',
|
|
||||||
id = 'com.google.truth:truth:0.30',
|
|
||||||
sha1 = '9d591b5a66eda81f0b88cf1c748ab8853d99b18b',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
exported_deps = [
|
|
||||||
':guava',
|
|
||||||
':junit',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'tukaani-xz',
|
|
||||||
id = 'org.tukaani:xz:1.4',
|
|
||||||
sha1 = '18a9a2ce6abf32ea1b5fd31dae5210ad93f4e5e3',
|
|
||||||
license = 'xz',
|
|
||||||
attach_source = False,
|
|
||||||
visibility = ['//gerrit-server:server'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'javassist',
|
|
||||||
id = 'org.javassist:javassist:3.20.0-GA',
|
|
||||||
sha1 = 'a9cbcdfb7e9f86fbc74d3afae65f2248bfbf82a0',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'blame-cache',
|
|
||||||
id = 'com/google/gitiles:blame-cache:0.1-9',
|
|
||||||
sha1 = '51d35e6f8bbc2412265066cea9653dd758c95826',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
repository = GERRIT,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Keep this version of Soy synchronized with the version used in Gitiles.
|
|
||||||
maven_jar(
|
|
||||||
name = 'soy',
|
|
||||||
id = 'com.google.template:soy:2016-08-09',
|
|
||||||
sha1 = '43d33651e95480d515fe26c10a662faafe3ad1e4',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [
|
|
||||||
':args4j',
|
|
||||||
':guava',
|
|
||||||
':gson',
|
|
||||||
':icu4j',
|
|
||||||
':jsr305',
|
|
||||||
':protobuf',
|
|
||||||
'//lib/guice:guice',
|
|
||||||
'//lib/guice:guice-assistedinject',
|
|
||||||
'//lib/guice:multibindings',
|
|
||||||
'//lib/guice:javax-inject',
|
|
||||||
'//lib/ow2:ow2-asm',
|
|
||||||
'//lib/ow2:ow2-asm-analysis',
|
|
||||||
'//lib/ow2:ow2-asm-commons',
|
|
||||||
'//lib/ow2:ow2-asm-util',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'icu4j',
|
|
||||||
id = 'com.ibm.icu:icu4j:57.1',
|
|
||||||
sha1 = '198ea005f41219f038f4291f0b0e9f3259730e92',
|
|
||||||
license = 'icu4j',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'errorprone',
|
|
||||||
id = 'com.google.errorprone:error_prone_ant:2.0.15',
|
|
||||||
sha1 = '607e3866e2ee25b74708c2898f84eac2f5452d2f',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
|
@ -1,48 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
VERSION = '3.5.2'
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'java_runtime',
|
|
||||||
id = 'org.antlr:antlr-runtime:' + VERSION,
|
|
||||||
sha1 = 'cd9cd41361c155f3af0f653009dcecb08d8b4afd',
|
|
||||||
license = 'antlr',
|
|
||||||
)
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'antlr-tool',
|
|
||||||
main_class = 'org.antlr.Tool',
|
|
||||||
deps = [':tool'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'stringtemplate',
|
|
||||||
id = 'org.antlr:stringtemplate:4.0.2',
|
|
||||||
sha1 = 'e28e09e2d44d60506a7bcb004d6c23ff35c6ac08',
|
|
||||||
license = 'antlr',
|
|
||||||
attach_source = False,
|
|
||||||
visibility = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'tool',
|
|
||||||
id = 'org.antlr:antlr:' + VERSION,
|
|
||||||
sha1 = 'c4a65c950bfc3e7d04309c515b2177c00baf7764',
|
|
||||||
license = 'antlr',
|
|
||||||
deps = [
|
|
||||||
':java_runtime',
|
|
||||||
':stringtemplate',
|
|
||||||
':antlr27',
|
|
||||||
],
|
|
||||||
visibility = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'antlr27',
|
|
||||||
id = 'antlr:antlr:2.7.7',
|
|
||||||
sha1 = '83cd2cd674a217ade95a4bb83a8a14f351f48bd0',
|
|
||||||
license = 'antlr',
|
|
||||||
attach_source = False,
|
|
||||||
visibility = [],
|
|
||||||
)
|
|
|
@ -1,61 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'asciidoc',
|
|
||||||
main_class = 'AsciiDoctor',
|
|
||||||
deps = [':asciidoc_lib'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'asciidoc_lib',
|
|
||||||
srcs = ['java/AsciiDoctor.java'],
|
|
||||||
deps = [
|
|
||||||
':asciidoctor',
|
|
||||||
':jruby',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/log:api',
|
|
||||||
'//lib/log:nop',
|
|
||||||
],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_binary(
|
|
||||||
name = 'doc_indexer',
|
|
||||||
main_class = 'DocIndexer',
|
|
||||||
deps = [':doc_indexer_lib'],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
||||||
java_library(
|
|
||||||
name = 'doc_indexer_lib',
|
|
||||||
srcs = ['java/DocIndexer.java'],
|
|
||||||
deps = [
|
|
||||||
':asciidoc_lib',
|
|
||||||
'//gerrit-server:constants',
|
|
||||||
'//lib:args4j',
|
|
||||||
'//lib:guava',
|
|
||||||
'//lib/lucene:lucene-analyzers-common',
|
|
||||||
'//lib/lucene:lucene-core-and-backward-codecs',
|
|
||||||
],
|
|
||||||
visibility = ['//tools/eclipse:classpath'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'asciidoctor',
|
|
||||||
id = 'org.asciidoctor:asciidoctorj:1.5.4.1',
|
|
||||||
sha1 = 'f7ddfb2bbed2f8da3f9ad0d1a5514f04b4274a5a',
|
|
||||||
license = 'asciidoctor',
|
|
||||||
visibility = [],
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jruby',
|
|
||||||
id = 'org.jruby:jruby-complete:9.1.5.0',
|
|
||||||
sha1 = '00d0003e99da3c4d830b12c099691ce910c84e39',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
visibility = [],
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
|
@ -1,9 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'auto-value',
|
|
||||||
id = 'com.google.auto.value:auto-value:1.4-rc1',
|
|
||||||
sha1 = '9347939002003a7a3c3af48271fc2c18734528a4',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
|
@ -1,21 +0,0 @@
|
||||||
# NOTE: Do not use this file in your build rules; automatically supported by
|
|
||||||
# our implementation of java_library.
|
|
||||||
|
|
||||||
AUTO_VALUE_DEP = '//lib/auto:auto-value'
|
|
||||||
|
|
||||||
# Annotation processor classpath requires transitive dependencies.
|
|
||||||
# TODO(dborowitz): Clean this up when buck issue is closed and there is a
|
|
||||||
# better supported interface:
|
|
||||||
# https://github.com/facebook/buck/issues/85
|
|
||||||
AUTO_VALUE_PROCESSOR_DEPS = [
|
|
||||||
'//lib:velocity',
|
|
||||||
'//lib/auto:auto-value',
|
|
||||||
'//lib/commons:collections',
|
|
||||||
'//lib/commons:lang',
|
|
||||||
'//lib/commons:oro',
|
|
||||||
]
|
|
||||||
|
|
||||||
AUTO_VALUE_PROCESSORS = [
|
|
||||||
'com.google.auto.value.processor.AutoAnnotationProcessor',
|
|
||||||
'com.google.auto.value.processor.AutoValueProcessor',
|
|
||||||
]
|
|
|
@ -1,28 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
# This version must match the version that also appears in
|
|
||||||
# gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/libraries.config
|
|
||||||
VERSION = '1.56'
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'bcprov',
|
|
||||||
id = 'org.bouncycastle:bcprov-jdk15on:' + VERSION,
|
|
||||||
sha1 = 'a153c6f9744a3e9dd6feab5e210e1c9861362ec7',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'bcpg',
|
|
||||||
id = 'org.bouncycastle:bcpg-jdk15on:' + VERSION,
|
|
||||||
sha1 = '9c3f2e7072c8cc1152079b5c25291a9f462631f1',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
|
|
||||||
deps = [':bcprov'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'bcpkix',
|
|
||||||
id = 'org.bouncycastle:bcpkix-jdk15on:' + VERSION,
|
|
||||||
sha1 = '4648af70268b6fdb24674fb1fd7c1fcc73db1231',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
|
|
||||||
deps = [':bcprov'],
|
|
||||||
)
|
|
|
@ -1,140 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
include_defs('//lib/codemirror/cm.defs')
|
|
||||||
|
|
||||||
VERSION = '5.22.0'
|
|
||||||
TOP = 'META-INF/resources/webjars/codemirror/%s' % VERSION
|
|
||||||
TOP_MINIFIED = 'META-INF/resources/webjars/codemirror-minified/%s' % VERSION
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'codemirror-minified',
|
|
||||||
id = 'org.webjars.npm:codemirror-minified:' + VERSION,
|
|
||||||
sha1 = '3e8767c9293614968176fcf66cb873d6eb8b3051',
|
|
||||||
attach_source = False,
|
|
||||||
license = 'codemirror-minified',
|
|
||||||
visibility = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'codemirror-original',
|
|
||||||
id = 'org.webjars.npm:codemirror:' + VERSION,
|
|
||||||
sha1 = '879c49085a44f062554a4e4a9ac248b7083d37cf',
|
|
||||||
attach_source = False,
|
|
||||||
license = 'codemirror-original',
|
|
||||||
visibility = [],
|
|
||||||
)
|
|
||||||
|
|
||||||
DIFF_MATCH_PATCH_TOP = ('META-INF/resources/webjars/google-diff-match-patch/%s'
|
|
||||||
% DIFF_MATCH_PATCH_VERSION)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'diff-match-patch',
|
|
||||||
id = 'org.webjars:google-diff-match-patch:' + DIFF_MATCH_PATCH_VERSION,
|
|
||||||
sha1 = '0cf1782dbcb8359d95070da9176059a5a9d37709',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
for archive, suffix, top in [('codemirror-original', '', TOP), ('codemirror-minified', '_r', TOP_MINIFIED)]:
|
|
||||||
# Main JavaScript and addons
|
|
||||||
genrule(
|
|
||||||
name = 'cm' + suffix,
|
|
||||||
cmd = ';'.join([
|
|
||||||
"echo '/** @license' >$OUT",
|
|
||||||
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
|
|
||||||
"echo '*/' >>$OUT",
|
|
||||||
] +
|
|
||||||
['unzip -p $(location :%s) %s/%s >>$OUT' % (archive, top, n) for n in CM_JS] +
|
|
||||||
['unzip -p $(location :%s) %s/addon/%s >>$OUT' % (archive, top, n)
|
|
||||||
for n in CM_ADDONS]
|
|
||||||
),
|
|
||||||
out = 'cm%s.js' % suffix,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Main CSS
|
|
||||||
genrule(
|
|
||||||
name = 'css' + suffix,
|
|
||||||
cmd = ';'.join([
|
|
||||||
"echo '/** @license' >$OUT",
|
|
||||||
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
|
|
||||||
"echo '*/' >>$OUT",
|
|
||||||
] +
|
|
||||||
['unzip -p $(location :%s) %s/%s >>$OUT' % (archive, top, n)
|
|
||||||
for n in CM_CSS]
|
|
||||||
),
|
|
||||||
out = 'cm%s.css' % suffix,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Modes
|
|
||||||
for n in CM_MODES:
|
|
||||||
genrule (
|
|
||||||
name = 'mode_%s%s' % (n, suffix),
|
|
||||||
cmd = ';'.join([
|
|
||||||
"echo '/** @license' >$OUT",
|
|
||||||
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
|
|
||||||
"echo '*/' >>$OUT",
|
|
||||||
'unzip -p $(location :%s) %s/mode/%s/%s.js >>$OUT' % (archive, top, n, n),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
out = 'mode_%s%s.js' % (n, suffix),
|
|
||||||
)
|
|
||||||
|
|
||||||
# Themes
|
|
||||||
for n in CM_THEMES:
|
|
||||||
genrule(
|
|
||||||
name = 'theme_%s%s' % (n, suffix),
|
|
||||||
cmd = ';'.join([
|
|
||||||
"echo '/** @license' >$OUT",
|
|
||||||
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
|
|
||||||
"echo '*/' >>$OUT",
|
|
||||||
'unzip -p $(location :%s) %s/theme/%s.css >>$OUT' % (archive, top, n)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
out = 'theme_%s%s.css' % (n, suffix),
|
|
||||||
)
|
|
||||||
|
|
||||||
# Merge Addon bundled with diff-match-patch
|
|
||||||
genrule(
|
|
||||||
name = 'addon_merge_with_diff_match_patch%s' % suffix,
|
|
||||||
cmd = ';'.join([
|
|
||||||
"echo '/** @license' >$OUT",
|
|
||||||
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
|
|
||||||
"echo '*/\n' >>$OUT",
|
|
||||||
"echo '// The google-diff-match-patch library is from https://repo1.maven.org/maven2/org/webjars/google-diff-match-patch/%s/google-diff-match-patch-%s.jar\n' >> $OUT" % (DIFF_MATCH_PATCH_VERSION, DIFF_MATCH_PATCH_VERSION),
|
|
||||||
"echo '/** @license' >>$OUT",
|
|
||||||
'cat $(location //lib:LICENSE-Apache2.0) >>$OUT',
|
|
||||||
"echo '*/' >>$OUT",
|
|
||||||
'unzip -p $(location :diff-match-patch) %s/diff_match_patch.js >>$OUT' % DIFF_MATCH_PATCH_TOP,
|
|
||||||
"echo ';' >> $OUT",
|
|
||||||
'unzip -p $(location :%s) %s/addon/merge/merge.js >>$OUT' % (archive, top)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
out = 'addon_merge_with_diff_match_patch%s.js' % suffix,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Jar packaging
|
|
||||||
genrule(
|
|
||||||
name = 'jar' + suffix,
|
|
||||||
cmd = ';'.join([
|
|
||||||
'cd $TMP',
|
|
||||||
'mkdir -p net/codemirror/{addon,lib,mode,theme}',
|
|
||||||
'cp $(location :css%s) net/codemirror/lib/cm.css' % suffix,
|
|
||||||
'cp $(location :cm%s) net/codemirror/lib/cm.js' % suffix]
|
|
||||||
+ ['cp $(location :mode_%s%s) net/codemirror/mode/%s.js' % (n, suffix, n)
|
|
||||||
for n in CM_MODES]
|
|
||||||
+ ['cp $(location :theme_%s%s) net/codemirror/theme/%s.css' % (n, suffix, n)
|
|
||||||
for n in CM_THEMES]
|
|
||||||
+ ['cp $(location :addon_merge_with_diff_match_patch%s) net/codemirror/addon/merge_bundled.js' % suffix]
|
|
||||||
+ ['zip -qr $OUT net/codemirror/{addon,lib,mode,theme}']),
|
|
||||||
out = 'codemirror%s.jar' % suffix,
|
|
||||||
)
|
|
||||||
|
|
||||||
prebuilt_jar(
|
|
||||||
name = 'codemirror' + suffix,
|
|
||||||
binary_jar = ':jar%s' % suffix,
|
|
||||||
deps = [
|
|
||||||
':jar' + suffix,
|
|
||||||
'//lib:LICENSE-' + archive,
|
|
||||||
],
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,215 +0,0 @@
|
||||||
CM_CSS = [
|
|
||||||
'lib/codemirror.css',
|
|
||||||
'addon/dialog/dialog.css',
|
|
||||||
'addon/merge/merge.css',
|
|
||||||
'addon/scroll/simplescrollbars.css',
|
|
||||||
'addon/search/matchesonscrollbar.css',
|
|
||||||
'addon/lint/lint.css',
|
|
||||||
]
|
|
||||||
|
|
||||||
CM_JS = [
|
|
||||||
'lib/codemirror.js',
|
|
||||||
'mode/meta.js',
|
|
||||||
'keymap/emacs.js',
|
|
||||||
'keymap/sublime.js',
|
|
||||||
'keymap/vim.js',
|
|
||||||
]
|
|
||||||
|
|
||||||
CM_ADDONS = [
|
|
||||||
'dialog/dialog.js',
|
|
||||||
'edit/closebrackets.js',
|
|
||||||
'edit/matchbrackets.js',
|
|
||||||
'edit/trailingspace.js',
|
|
||||||
'scroll/annotatescrollbar.js',
|
|
||||||
'scroll/simplescrollbars.js',
|
|
||||||
'search/jump-to-line.js',
|
|
||||||
'search/matchesonscrollbar.js',
|
|
||||||
'search/searchcursor.js',
|
|
||||||
'search/search.js',
|
|
||||||
'selection/mark-selection.js',
|
|
||||||
'mode/multiplex.js',
|
|
||||||
'mode/overlay.js',
|
|
||||||
'mode/simple.js',
|
|
||||||
'lint/lint.js',
|
|
||||||
]
|
|
||||||
|
|
||||||
# Available themes must be enumerated here,
|
|
||||||
# in gerrit-extension-api/src/main/java/com/google/gerrit/extensions/common/Theme.java,
|
|
||||||
# in gerrit-gwtui/src/main/java/net/codemirror/theme/Themes.java
|
|
||||||
CM_THEMES = [
|
|
||||||
'3024-day',
|
|
||||||
'3024-night',
|
|
||||||
'abcdef',
|
|
||||||
'ambiance',
|
|
||||||
'base16-dark',
|
|
||||||
'base16-light',
|
|
||||||
'bespin',
|
|
||||||
'blackboard',
|
|
||||||
'cobalt',
|
|
||||||
'colorforth',
|
|
||||||
'dracula',
|
|
||||||
'duotone-dark',
|
|
||||||
'duotone-light',
|
|
||||||
'eclipse',
|
|
||||||
'elegant',
|
|
||||||
'erlang-dark',
|
|
||||||
'hopscotch',
|
|
||||||
'icecoder',
|
|
||||||
'isotope',
|
|
||||||
'lesser-dark',
|
|
||||||
'liquibyte',
|
|
||||||
'material',
|
|
||||||
'mbo',
|
|
||||||
'mdn-like',
|
|
||||||
'midnight',
|
|
||||||
'monokai',
|
|
||||||
'neat',
|
|
||||||
'neo',
|
|
||||||
'night',
|
|
||||||
'paraiso-dark',
|
|
||||||
'paraiso-light',
|
|
||||||
'pastel-on-dark',
|
|
||||||
'railscasts',
|
|
||||||
'rubyblue',
|
|
||||||
'seti',
|
|
||||||
'solarized',
|
|
||||||
'the-matrix',
|
|
||||||
'tomorrow-night-bright',
|
|
||||||
'tomorrow-night-eighties',
|
|
||||||
'ttcn',
|
|
||||||
'twilight',
|
|
||||||
'vibrant-ink',
|
|
||||||
'xq-dark',
|
|
||||||
'xq-light',
|
|
||||||
'yeti',
|
|
||||||
'zenburn',
|
|
||||||
]
|
|
||||||
|
|
||||||
# Available modes must be enumerated here,
|
|
||||||
# in gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java,
|
|
||||||
# gerrit-gwtui/src/main/java/net/codemirror/mode/ModeInfo.java,
|
|
||||||
# and in CodeMirror's own mode/meta.js script.
|
|
||||||
CM_MODES = [
|
|
||||||
'apl',
|
|
||||||
'asciiarmor',
|
|
||||||
'asn.1',
|
|
||||||
'asterisk',
|
|
||||||
'brainfuck',
|
|
||||||
'clike',
|
|
||||||
'clojure',
|
|
||||||
'cmake',
|
|
||||||
'cobol',
|
|
||||||
'coffeescript',
|
|
||||||
'commonlisp',
|
|
||||||
'crystal',
|
|
||||||
'css',
|
|
||||||
'cypher',
|
|
||||||
'd',
|
|
||||||
'dart',
|
|
||||||
'diff',
|
|
||||||
'django',
|
|
||||||
'dockerfile',
|
|
||||||
'dtd',
|
|
||||||
'dylan',
|
|
||||||
'ebnf',
|
|
||||||
'ecl',
|
|
||||||
'eiffel',
|
|
||||||
'elm',
|
|
||||||
'erlang',
|
|
||||||
'factor',
|
|
||||||
'fcl',
|
|
||||||
'forth',
|
|
||||||
'fortran',
|
|
||||||
'gas',
|
|
||||||
'gfm',
|
|
||||||
'gherkin',
|
|
||||||
'go',
|
|
||||||
'groovy',
|
|
||||||
'haml',
|
|
||||||
'handlebars',
|
|
||||||
'haskell-literate',
|
|
||||||
'haskell',
|
|
||||||
'haxe',
|
|
||||||
'htmlembedded',
|
|
||||||
'htmlmixed',
|
|
||||||
'http',
|
|
||||||
'idl',
|
|
||||||
'javascript',
|
|
||||||
'jinja2',
|
|
||||||
'jsx',
|
|
||||||
'julia',
|
|
||||||
'livescript',
|
|
||||||
'lua',
|
|
||||||
'markdown',
|
|
||||||
'mathematica',
|
|
||||||
'mbox',
|
|
||||||
'mirc',
|
|
||||||
'mllike',
|
|
||||||
'modelica',
|
|
||||||
'mscgen',
|
|
||||||
'mumps',
|
|
||||||
'nginx',
|
|
||||||
'nsis',
|
|
||||||
'ntriples',
|
|
||||||
'octave',
|
|
||||||
'oz',
|
|
||||||
'pascal',
|
|
||||||
'pegjs',
|
|
||||||
'perl',
|
|
||||||
'php',
|
|
||||||
'pig',
|
|
||||||
'powershell',
|
|
||||||
'properties',
|
|
||||||
'protobuf',
|
|
||||||
'pug',
|
|
||||||
'puppet',
|
|
||||||
'python',
|
|
||||||
'q',
|
|
||||||
'r',
|
|
||||||
'rpm',
|
|
||||||
'rst',
|
|
||||||
'ruby',
|
|
||||||
'rust',
|
|
||||||
'sas',
|
|
||||||
'sass',
|
|
||||||
'scheme',
|
|
||||||
'shell',
|
|
||||||
'sieve',
|
|
||||||
'slim',
|
|
||||||
'smalltalk',
|
|
||||||
'smarty',
|
|
||||||
'solr',
|
|
||||||
'soy',
|
|
||||||
'sparql',
|
|
||||||
'spreadsheet',
|
|
||||||
'sql',
|
|
||||||
'stex',
|
|
||||||
'stylus',
|
|
||||||
'swift',
|
|
||||||
'tcl',
|
|
||||||
'textile',
|
|
||||||
'tiddlywiki',
|
|
||||||
'tiki',
|
|
||||||
'toml',
|
|
||||||
'tornado',
|
|
||||||
'troff',
|
|
||||||
'ttcn-cfg',
|
|
||||||
'ttcn',
|
|
||||||
'turtle',
|
|
||||||
'twig',
|
|
||||||
'vb',
|
|
||||||
'vbscript',
|
|
||||||
'velocity',
|
|
||||||
'verilog',
|
|
||||||
'vhdl',
|
|
||||||
'vue',
|
|
||||||
'webidl',
|
|
||||||
'xml',
|
|
||||||
'xquery',
|
|
||||||
'yacas',
|
|
||||||
'yaml-frontmatter',
|
|
||||||
'yaml',
|
|
||||||
'z80',
|
|
||||||
]
|
|
||||||
|
|
||||||
DIFF_MATCH_PATCH_VERSION = "20121119-1"
|
|
|
@ -1,93 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'codec',
|
|
||||||
id = 'commons-codec:commons-codec:1.4',
|
|
||||||
sha1 = '4216af16d38465bbab0f3dff8efa14204f7a399a',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'collections',
|
|
||||||
id = 'commons-collections:commons-collections:3.2.2',
|
|
||||||
sha1 = '8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'compress',
|
|
||||||
id = 'org.apache.commons:commons-compress:1.12',
|
|
||||||
sha1 = '84caa68576e345eb5e7ae61a0e5a9229eb100d7b',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'dbcp',
|
|
||||||
id = 'commons-dbcp:commons-dbcp:1.4',
|
|
||||||
sha1 = '30be73c965cc990b153a100aaaaafcf239f82d39',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [':pool'],
|
|
||||||
exclude = [
|
|
||||||
'META-INF/LICENSE.txt',
|
|
||||||
'META-INF/NOTICE.txt',
|
|
||||||
'testpool.jocl'
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'lang',
|
|
||||||
id = 'commons-lang:commons-lang:2.6',
|
|
||||||
sha1 = '0ce1edb914c94ebc388f086c6827e8bdeec71ac2',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'lang3',
|
|
||||||
id = 'org.apache.commons:commons-lang3:3.3.2',
|
|
||||||
sha1 = '90a3822c38ec8c996e84c16a3477ef632cbc87a3',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'net',
|
|
||||||
id = 'commons-net:commons-net:3.5',
|
|
||||||
sha1 = '342fc284019f590e1308056990fdb24a08f06318',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'pool',
|
|
||||||
id = 'commons-pool:commons-pool:1.5.5',
|
|
||||||
sha1 = '7d8ffbdc47aa0c5a8afe5dc2aaf512f369f1d19b',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
attach_source = False,
|
|
||||||
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'oro',
|
|
||||||
id = 'oro:oro:2.0.8',
|
|
||||||
sha1 = '5592374f834645c4ae250f4c9fbb314c9369d698',
|
|
||||||
license = 'Apache1.1',
|
|
||||||
attach_source = False,
|
|
||||||
exclude = ['META-INF/LICENSE'],
|
|
||||||
)
|
|
||||||
|
|
||||||
# When updating the version of commons-validator, also update the
|
|
||||||
# list of supported TLDs in:
|
|
||||||
# gerrit-server/src/test/resources/com/google/gerrit/server/mail/tlds-alpha-by-domain.txt
|
|
||||||
# from:
|
|
||||||
# http://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
|
||||||
maven_jar(
|
|
||||||
name = 'validator',
|
|
||||||
id = 'commons-validator:commons-validator:1.5.1',
|
|
||||||
sha1 = '86d05a46e8f064b300657f751b5a98c62807e2a0',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'dropwizard-core',
|
|
||||||
id = 'io.dropwizard.metrics:metrics-core:3.1.2',
|
|
||||||
sha1 = '224f03afd2521c6c94632f566beb1bb5ee32cf07',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
|
@ -1,31 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'easymock',
|
|
||||||
id = 'org.easymock:easymock:3.1', # When bumping the version
|
|
||||||
# number, make sure to also move powermock to a compatible version
|
|
||||||
sha1 = '3e127311a86fc2e8f550ef8ee4abe094bbcf7e7e',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
deps = [
|
|
||||||
':cglib-3_2',
|
|
||||||
':objenesis',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'cglib-3_2',
|
|
||||||
id = 'cglib:cglib-nodep:3.2.0',
|
|
||||||
sha1 = 'cf1ca207c15b04ace918270b6cb3f5601160cdfd',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'objenesis',
|
|
||||||
id = 'org.objenesis:objenesis:1.3',
|
|
||||||
sha1 = 'dc13ae4faca6df981fc7aeb5a522d9db446d5d50',
|
|
||||||
license = 'DO_NOT_DISTRIBUTE',
|
|
||||||
visibility = ['//lib/powermock:powermock-reflect'],
|
|
||||||
attach_source = False,
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,104 +0,0 @@
|
||||||
include_defs('//lib/maven.defs')
|
|
||||||
|
|
||||||
# Java client library for Elasticsearch.
|
|
||||||
maven_jar(
|
|
||||||
name = 'elasticsearch',
|
|
||||||
id = 'org.elasticsearch:elasticsearch:2.4.0',
|
|
||||||
sha1 = 'aeb9704a76fa8654c348f38fcbb993a952a7ab07',
|
|
||||||
attach_source = True,
|
|
||||||
repository = MAVEN_CENTRAL,
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [
|
|
||||||
':jna',
|
|
||||||
':hppc',
|
|
||||||
':jsr166e',
|
|
||||||
':netty',
|
|
||||||
':t-digest',
|
|
||||||
':compress-lzf',
|
|
||||||
'//lib/joda:joda-time',
|
|
||||||
'//lib/lucene:lucene-codecs',
|
|
||||||
'//lib/lucene:lucene-highlighter',
|
|
||||||
'//lib/lucene:lucene-join',
|
|
||||||
'//lib/lucene:lucene-memory',
|
|
||||||
'//lib/lucene:lucene-sandbox',
|
|
||||||
'//lib/lucene:lucene-suggest',
|
|
||||||
'//lib/lucene:lucene-queries',
|
|
||||||
'//lib/lucene:lucene-spatial',
|
|
||||||
'//lib/jackson:jackson-core',
|
|
||||||
'//lib/jackson:jackson-dataformat-cbor',
|
|
||||||
'//lib/jackson:jackson-dataformat-smile',
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
# Java REST client for Elasticsearch.
|
|
||||||
VERSION = '2.0.3'
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jest-common',
|
|
||||||
id = 'io.searchbox:jest-common:' + VERSION,
|
|
||||||
sha1 = 'f304c66894aaf2f6c17a886bc826f09c7a161cf9',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jest',
|
|
||||||
id = 'io.searchbox:jest:' + VERSION,
|
|
||||||
sha1 = 'b8f9ed1423489b361804e47f640515ea9f1fa08d',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
deps = [
|
|
||||||
':elasticsearch',
|
|
||||||
':jest-common',
|
|
||||||
'//lib/commons:lang3',
|
|
||||||
'//lib/httpcomponents:httpasyncclient',
|
|
||||||
'//lib/httpcomponents:httpclient',
|
|
||||||
'//lib/httpcomponents:httpcore-nio',
|
|
||||||
'//lib/httpcomponents:httpcore-niossl',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'compress-lzf',
|
|
||||||
id = 'com.ning:compress-lzf:1.0.2',
|
|
||||||
sha1 = '62896e6fca184c79cc01a14d143f3ae2b4f4b4ae',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
visibility = ['//lib/elasticsearch:elasticsearch'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'hppc',
|
|
||||||
id = 'com.carrotsearch:hppc:0.7.1',
|
|
||||||
sha1 = '8b5057f74ea378c0150a1860874a3ebdcb713767',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
visibility = ['//lib/elasticsearch:elasticsearch'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jsr166e',
|
|
||||||
id = 'com.twitter:jsr166e:1.1.0',
|
|
||||||
sha1 = '233098147123ee5ddcd39ffc57ff648be4b7e5b2',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
visibility = ['//lib/elasticsearch:elasticsearch'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'netty',
|
|
||||||
id = 'io.netty:netty:3.10.0.Final',
|
|
||||||
sha1 = 'ad61cd1bba067e6634ddd3e160edf0727391ac30',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
visibility = ['//lib/elasticsearch:elasticsearch'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 't-digest',
|
|
||||||
id = 'com.tdunning:t-digest:3.0',
|
|
||||||
sha1 = '84ccf145ac2215e6bfa63baa3101c0af41017cfc',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
visibility = ['//lib/elasticsearch:elasticsearch'],
|
|
||||||
)
|
|
||||||
|
|
||||||
maven_jar(
|
|
||||||
name = 'jna',
|
|
||||||
id = 'net.java.dev.jna:jna:4.1.0',
|
|
||||||
sha1 = '1c12d070e602efd8021891cdd7fd18bc129372d4',
|
|
||||||
license = 'Apache2.0',
|
|
||||||
)
|
|
|
@ -1,13 +0,0 @@
|
||||||
# Source Code Pro. Version 2.010 Roman / 1.030 Italics
|
|
||||||
# https://github.com/adobe-fonts/source-code-pro/releases/tag/2.010R-ro%2F1.030R-it
|
|
||||||
genrule(
|
|
||||||
name = 'sourcecodepro',
|
|
||||||
cmd = 'zip -rq $OUT .',
|
|
||||||
srcs = [
|
|
||||||
'SourceCodePro-Regular.woff',
|
|
||||||
'SourceCodePro-Regular.woff2'
|
|
||||||
],
|
|
||||||
out = 'sourcecodepro.zip',
|
|
||||||
license = 'OFL1.1',
|
|
||||||
visibility = ['PUBLIC'],
|
|
||||||
)
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue