This patch adds gerrit.war into api_{install,deploy} buck build step.
This allows third party maven based builds depend on gerrit.war
artifact.
Change-Id: I22c8d3339a1647913967e423e45462c2c5c255de
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This change allows to compile optimized GWT version for popular brwosers:
buck build chrome
buck build firefox
buck build safari
And no: IE is not among them:
buck build ie
BUILD FAILED: No directory ie when resolving target //ie:ie
Change-Id: I4f888bd114928555967022c5586e2b3ef16396b0
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
(cherry picked from commit c8cffc8e928a9277621ffff6cb740f79cd662195)
buck build api
generates now javadocs.
buck build api_install
installs all plugin/extension related artifacts with javadocs in the
local Maven repository.
Change-Id: Ifa6a8eb469f388e16449576ff2bff01a5dce67dd
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
The documentation of this endpoint is available in
rest-api-docsearch[.txt|.html].
The UI of showing the search result and doing the search will be in a
separate change.
Change-Id: Ifa4f5a7d576ada7f88a4fa1b765a38cba6d7e964
genrule() no longer supports running commands run only for the
side-effect with no output file. Actions like download_sources or
eclipse need to be handled using Python scripts executed from the
user's shell, otherwise Buck fails if caching is enabled.
Change-Id: I361fc20675f211e15e4ab7942ef52778d0a615c2
Since the tentative switch to Buck, plugins could no longer hook into
gerrit's init procedure, as the plugin api no longer exposed the
required classes. We re-add the required classes to make hooks-its
compile against the plugin api.
Change-Id: I0da8089c718f4a3c246ccc34cc45ae2f6b7d1aab
These are already named using the alias in the .buckconfig. Moving
them down to tools allows their program to drop a visbility rule, and
shortens the top level file a bit.
Change-Id: I4193249c02850cb7aca3bf7fab81113c5f7b7d8b
Rewrite the Maven tool to accept a spec of things to process on the
command line and use $(location) in the invoking genrule() to locate
the necessary files from Buck. This gets rid of special cases in the
mvn wrapper tool and allows the definition to be given completely from
Buck as part of the build description.
Maven needs to be single threaded to perform repository updates safely
so only one genrule() target is declared to buck for the deploy or
install action. The rule is given all artifact information in a single
pass, allowing the mvn.py wrapper to execute them.
Change-Id: Idbcf645b69280420987a0e8f52947ba93ac9e6f0
Use GERRIT_VERSION rather than GERRIT_VER. VER is not a commonly used
term to name the version string of a software product; VERSION is.
Make the maven_deploy and maven_install rules a little more typical
by passing in the target name separate from the action.
Change-Id: I13a5d94cf5b078cfcb91c69177cadfc2953db33e
Latest version of buck is faster than the prior version used by
Gerrit. No-op updates when loading a debug version of the UI now take
only 1.804s on my laptop (previously 7s) and a draft UI compile is
only 24.659s (previously 39s).
The slow acceptance tests must now be excluded with `--exclude slow`.
Buck changed the meaning of the -e option to be --emulator, which is
unfortunately useful only for Android application developers.
genrule() now needs to use $(exe) to reference the binary to run,
offers $(location) to make it easier to find files in the build tree.
The empty srcs array is no longer required for genrule(). Buck has
determined it is sufficiently powerful with $(location) and deps that
requiring srcs is unnecessary.
Supporting .src.zip files in the srcs array of java_library() means
Gerrit no longer needs to run a separate genrule() to extract files
produced by ANTLR, or call javac inside of the BuckPrologCompiler
support glue.
Change-Id: Ib03042921a081b867a7aad0423bd45523e42917a
`buck build api_install` copies the artifacts to the local maven repository.
`buck build api_deploy` uploads the artifacts to the remote maven repository.
The type of the repo is induced from the Gerrit version name, i. e.
* 2.8-SNAPSHOT: snapshot repo
* 2.8: release repo
Change-Id: I063834bb39311a4d92f5fdbb183f70b1fb8418b6
BUCK is currently lacking native support for source jar generation.
Generate sources JARs for the API manually, until BUCK supports it.
Change-Id: I64fda0fdd82ca3ca37ac46d74e9550b2d9dddb39
java_library() targets must now list every dependency they need for
an import. This permits buck to run more targets in parallel as it
has a better view of the dependency graph, and opens the door for
buck to make even more optimizations in the future.
Change-Id: I132bf47a725e44ba5950ba6ca76bfa72c3876906
Previously it also setup the prebuilt_jar() which isn't actually
necessary to execute the download. This reduces the size of the
command line passed into the child buck process.
Before this change not all libraries were downloaded during the
download target. Targets in the root of //lib were skipped due to
an incorrect regex passed to egrep. This has been fixed with the
new regex inside of download_all.py.
The initial binary download now requires ~59s on my home cable modem,
and pulls 84M.
Source JARs are now only downloaded when the user builds the
download_sources target. This saves ~30s of setup time on a
the same connection and reduces the initial download by 16M.
Change-Id: Ie3bc97c9101c94f8bc4b89664bbd218323ad7230
Try to reduce the size of the top-level BUCK file by moving
anything that has to do with Eclipse project generation and
classpath management into tools/eclipse.
Change-Id: Id779eaff4fe732908b28a8e3441004e364b59e21
These genrules do not produce an output file, instead they are run
by the developer to obtain their side-effects like building other
targets they happen to depend on.
Make it more clear these are fake by naming them __fake.?__, a name
we should never see appear in buck-out/.
Change-Id: Id749b095a0b2990f8d9c7e3942215fc7463a5255
A last minute fix renamed the targets in gerrit-gwtui, breaking these
top-level rules. Correct them to point to ui_chrome and ui_firefox.
Change-Id: Ib1d5494548330fe3865288fa547c76c8adc16105
Implement a new build system using Buck[1], Facebook's
open source clone of Google's internal build system.
Pros:
- Concise build language
- Test and build output is concise
- Test failures and stack traces show on terminal
- Reliable incrementals; clean is unnecessary
- Extensible with simple blocks of Python
- Fast
buck: clean: 0.452s, full 1m21.083s [*], no-op: 7.145s,
mvn: clean: 4.596s, full 2m53.776s, no-op: 59.108s,
[*] full build includes downloading all dependencies,
time can vary due to remote server performance.
Cons:
- No Windows support
- No native Maven Central support (added by macros)
- No native GWT, Prolog, or WAR support (added by macros)
- Bootstrap of buck requires Ant
Getting started:
git clone https://gerrit.googlesource.com/buck
cd buck
ant
Mac OS X:
PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH"
Linux:
PATH="`pwd`/bin:$PATH"
Importing into Eclipse:
$ time buck build :eclipse
0m48.949s
Import existing project from `pwd`
Import 'gerrit' (do not import other Maven based projects)
Expand 'gerrit'
Right click 'buck-out' > Properties
Under Attributes check 'Derived'
If the code doesn't currently compile but an updated classpath
is needed, refresh the configs and obtain missing JARs:
$ buck build :eclipse_project :download
Running JUnit tests:
$ time buck test --all -e slow # skip slow tests
0m19.320s
$ time buck test --all # includes acceptance tests
5m17.517s
Building WAR:
$ buck build :gerrit
$ java -jar buck-out/gen/gerrit.war
Building release:
$ buck test --all && buck build :api :release
$ java -jar buck-out/gen/release.war
$ ls -lh buck-out/gen/{extension,plugin}-api.jar
Downloading dependencies:
Dependencies are normally downloaded automatically, but Buck can
inspect its graph and download missing dependencies so future
compiles can run without the network:
$ buck build :download
[1] http://facebook.github.io/buck/
Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655