69 Commits

Author SHA1 Message Date
David Pursehouse
5874cfdf2a Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  CreateProject: Add @UsedAt annotation
  ProjectConfig: Add @UsedAt annotation
  Use bazelisk as first choice for api.sh
  Change screen: Show abbreviated commit sha1 in patch set dropdown
  ProjectConfig: Add method to read from repository
  Remove buck related entries from .gitignore
  Replace references to bazel-genfiles with bazel-bin
  Set version to 2.14.21-SNAPSHOT

Change-Id: I45280689a579b0a411832410735ea82c545c8657
2019-10-17 00:47:50 +09:00
David Pursehouse
8c9a473cb0 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Use bazelisk as first choice for api.sh
  ProjectConfig: Add method to read from repository
  Remove buck related entries from .gitignore
  Replace references to bazel-genfiles with bazel-bin
  Set version to 2.14.21-SNAPSHOT

Change-Id: Ia6d9fe13f43e85514b6c5dce8cee1670d5dd8f12
2019-10-17 00:25:26 +09:00
David Pursehouse
6fc1ebe494 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Remove buck related entries from .gitignore
  Replace references to bazel-genfiles with bazel-bin
  Set version to 2.14.21-SNAPSHOT

Change-Id: I078eb9cfedfd1465437ab97af908061e950e35c8
2019-10-16 13:42:58 +09:00
David Pursehouse
b7879ea14a Remove buck related entries from .gitignore
Change-Id: I88469233bc3c89809b2146fd56b73852f8ddb885
2019-10-16 13:41:37 +09:00
David Pursehouse
4eadb71720 Remove GWT leftovers from .gitignore
Change-Id: I7c99733f91e51918e4b4c9934139ac3c060cc99c
2019-06-07 00:11:41 +00:00
David Ostrovsky
935868568c Add plugin-manager as core plugin
Having a mechanism to discover, install and upgrade plugins
is an expected feature for a core distribution.

Plugin manager has been included since the very beginning in
the binary packages (RPMs and Debs) and in the famous Docker
image that has been pulled over 100k times.

The only place where the plugin-manager is not present is
the WAR package: this proposal fills the gap and aligns the
package with the rest of the current distributions.

Feature: Issue 10717
Change-Id: Ia5b9c74f177aac135100d3cf138a38697a2db0ca
2019-05-03 06:58:24 +00:00
brohlfs
fe2cb8c168 Change the .gitignore pattern for plugins from a blacklist to a whitelist
Change-Id: Ibda4cd9281f79667c9fbdd1e58760ae163b2779a
2019-03-19 15:02:05 +01:00
brohlfs
ce4f7c5fdc Add bower and node files/dirs to .gitignore
Change-Id: I3900aec372167fb952e81b3049e7bbd29e41f186
2019-02-20 09:53:15 +01:00
David Pursehouse
e3295195b9 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Ignore intellij bazel plugin's data directory
  Update git submodules
  Update git submodules

Change-Id: Iaa74245a8a755977df943528b52baf0b053e0a6c
2018-11-10 14:33:40 +09:00
Antonio Barone
2d1c67e51b Ignore intellij bazel plugin's data directory
.ijwb is used by bazel intellij plugin to store build status.
Plugin info at: https://github.com/bazelbuild/intellij

Change-Id: Idf4e80f55eb405833068ed8ae6c0cdc4d12d782c
2018-11-09 10:20:16 +00:00
David Pursehouse
93f021a9d0 Add .apt_generated_tests to .gitignore
Change-Id: I1975da67be6268189c3875acfbb5dd6e33e6eee6
2018-10-15 10:06:26 +09:00
David Pursehouse
b0ddb9c82b Add .apt_generated_tests to .gitignore
Change-Id: I1975da67be6268189c3875acfbb5dd6e33e6eee6
2018-10-12 21:32:06 +09:00
Dave Borowitz
9c35979e12 Remove outstanding references to buck
Most references are in documentation and comments. The main
developer-visible behavior change is moving the downloaded artifact
cache from ~/.gerritcodereview/buck-cache to bazel-cache, which will
result in re-downloading dependencies on the next build; this had to
happen sooner or later. Alternatives, which are not worth the effort,
include teaching the scripts to accept both locations, or having it
rearrange and/or symlink directories behind the scenes.

There are just a few references remaining, all of which are intentional:

$ git grep -Pi '\bbuck(lets?)?\b' HEAD
HEAD:java/com/google/gerrit/httpd/raw/StaticModule.java:        // https://gerrit-review.googlesource.com/#/c/57570/57/gerrit-httpd/BUCK@32
HEAD:resources/com/google/gerrit/server/mime/mime-types.properties:bucklet = text/x-python
HEAD:resources/com/google/gerrit/server/mime/mime-types.properties:BUCK = text/x-python

Change-Id: Idb93a483451ccf86ba96c379d38008a7894c3f95
2018-02-07 09:16:41 -05:00
Kasper Nilsson
c008f8f0a8 Add .vscode to gitignore
Change-Id: I767d0c1f631aa2d87fea54094667d3845479a824
2017-11-17 10:39:19 -08:00
David Pursehouse
670a5b241e Merge branch 'stable-2.15'
* stable-2.15:
  Documentation: Wrong field names in ChangeDetail JSON example
  Add /.bazel_path to .gitignore
  Add /plugins/cookbook-plugin/ to .gitignore
  AccountManager: Don't try to lookup external IDs from account index
  AccountManager#lookup: Don't use account index to resolve external ID

Change-Id: I97fa645bc007af7494e7a8139c657e0eef964be3
2017-11-07 08:14:36 +09:00
Edwin Kempin
9d830832e3 Add /plugins/cookbook-plugin/ to .gitignore
This folder pops up when switching between
master/stable-2.15/stable-2.14 and older stable branches.

Change-Id: I4c3c6e8835de8498a8a35b75eecd607de067eb55
Signed-off-by: Edwin Kempin <ekempin@google.com>
2017-11-06 11:41:05 +01:00
Dave Borowitz
16bc418680 .gitignore: Remove *.asc
This left some otherwise-empty directories in my source tree after
releasing v2.15-rc2; I would rather have been forced to clean these up.
This only affects maintainers, and only rarely, so the burden of an
occasional "git clean -f -d" is not high.

Change-Id: I70cd8a081d18eed50af006c1ccce4178f0333633
2017-11-03 14:06:00 +00:00
Orgad Shaneh
90761cd7a2 GitIgnore all bazel directories
bazel-gerrit depends on the repo's directory name. It is in fact:
bazel-$(basename $PWD).

Just ignore everything that starts with bazel- in the root directory.

Change-Id: I223bd684bff2ab3c25d8131a2cf0a3ccb14ce54f
2017-07-18 04:54:35 +00:00
David Pursehouse
c26261acf9 Fix launching daemon in Eclipse on MacOS
Change I5fc96bf1f removed the generation of the .primary_build_tool
file and change I3d6b90320 removed the build system abstraction with
the motivation that we now only have one build tool.

However this broke launching the daemon from Eclipse on MacOS, which
now fails because bazel is not on the path and can't be found.

Restore the removed functionality, but rename the file to .bazel_path

Change-Id: Ibd0ec09d3bf47f383ca68a37cca4e81640960416
2017-03-17 14:10:41 +09:00
David Pursehouse
34b59f0ad3 Get rid of references to .primary_build_tool
This was introduced to support both buck and bazel build tools, and
is no longer necessary since we completely dropped buck in favor of
bazel.

Change-Id: I5fc96bf1fc27f20180737fea954e150070e5302f
2017-03-15 08:38:05 +09:00
Dave Borowitz
4a74548c22 Document gjf and add a script to standardize/streamline setup
google-java-format is not uniformly available in package management
systems across OSes. More importantly, we want to make sure that all
contributors are using a standardized version, to avoid unnecessary
changes due to slight differences between versions.

While we're in the dev documentation, link to the Google Java Style
Guide, and remove some wording that is clearly redundant with the style
guide.

Change-Id: Ib14dab2e692339f836083fad08a7a435a2f24470
2017-02-07 12:38:37 -05:00
Dave Borowitz
31718be080 Sort .gitignore
Change-Id: I251a150323056aa414fdfa989dbab7a04d2219f3
2017-02-07 09:00:23 -05:00
David Pursehouse
1cd287ee77 Add .buckd/ back to .gitignore
Change-Id: I8e435f4ec965966ebfe3e15141d203d8c4e689df
2017-01-28 21:39:01 +09:00
Edwin Kempin
bb80502af7 Git ignore '/buck-out'
We still use Buck for the stable branches and when you switch from a
stable branch to the master branch it's annoying that '/buck-out' pops
up as untracked folder.

Change-Id: I2be21286706af6baa07e947cdef3a14666ce7cf2
Signed-off-by: Edwin Kempin <ekempin@google.com>
2017-01-27 08:38:59 +01:00
David Ostrovsky
fdbfcad77d Remove Buck based build
Bug: Issue 5302
Change-Id: I6e860446ef30ff0ad1c7c49fc0e39d39d921820b
2017-01-23 12:44:58 +00:00
David Ostrovsky
7965fd2c9b Ignore infer output folder
Infer [1] is a static code checker.

[1] http://fbinfer.com

Bug: Issue 5198
Change-Id: I51ac941b85b18c63ead61a2a3f00c5d58a9c2212
2016-12-25 09:41:21 +01:00
David Ostrovsky
c69f360714 Bazel: Generate Eclipse classpath
To guess what build system is used, we create now .primary_build_tool
file in the root of the project during the eclipse classpath generation.

Change the working directory for GWT SDM session to be .gwt_work_dir.
The reason for that Bazel doesn't allow to write to bazel-out.

Change-Id: I984068350244ee9d66807e4bc8c6779b34a26bab
2016-11-15 10:12:44 -08:00
Patrick Hiesel
1d440017b7 Ignore .metadata folder managed by Eclipse
Change-Id: I2a6abee66082e26e819d2fb4f07f84604fedd7df
2016-10-04 12:06:17 +02:00
David Ostrovsky
b81b4f75ae Implement Bazel build
To run the tests:

  bazel test //...

To build the Gerrit plugin API, run:

  bazel build gerrit-plugin-api:plugin-api_deploy.jar

To build the Gerrit extension API, run:

  bazel build gerrit-extension-api:extension-api_deploy.jar

TODOs:

Licenses
Reduce visibility (all public for now)
Generate HTML Documentation
Core plugins
gerrit_plugin() rule to build plugins in tree and standalone modes
GWT UI (only gwt_module() skylark rule is provided, no gwt_binary())
PolyGerrit UI
WAR
Publish artifacts to Maven Central
Ask Bazel team to add Gerrit to their CI on ci.bazel.io

Contributed-By: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I9a86e670882a44a5c966579cdeb8ed79b1590de3
2016-06-14 21:12:02 +02:00
Patrick Hiesel
80141a6571 Add .eml files to gitignore
eml files are generated by IntelliJ as a substitute for .iml files if
the workspace is organized in .classpath files. These should not be
pushed.

Change-Id: If47838a2a58b6d76cd6c68461d54929b0a732234
2016-05-12 00:57:44 +00:00
Patrick Hiesel
b156a5a19e Added tmp files to gitignore
I've added common editor tmp files (*~) to the gitignore as
these should not be pushed.

Change-Id: I88a7bb0b42e4ccbe5218d3d2a59aa18081ab75d6
2016-04-28 17:16:06 +02:00
Han-Wen Nienhuys
c19a34577b Ignore all *.iml (IntelliJ module files).
Change-Id: Ib17a50fa7c089db88e5cb92b905efbb3aafbb192
2016-02-09 16:11:01 +01:00
David Ostrovsky
58cb4b4881 Update Buck to newest version
The new Buck version fixed annoying stdout spamming bug on unit test
failures: [1]. Now we can revert our monkey patching hack to prevent
that.

Since [2] Buck interferes with files in buck-out directory: [3]. Switch
to using eclipse-out directory as Eclipse output directory instead. For
this change it's necessary to clean up buck-out directory, otherwise
`buck test` would fail.

This version also fixed "Python client lost connection" bug: [4].

This reverts commit 94e93aaad22e67b5956627cff1a9cb84d03a29ec.

[1] https://github.com/facebook/buck/issues/505
[2] 35cb495b57
[3] https://github.com/facebook/buck/issues/527
[4] https://github.com/facebook/buck/issues/534

Change-Id: I4cd1a99ce9d0615713c235d873e6cdd61b1854bb
2015-12-02 14:07:12 +00:00
Andrew Bonventre
43b5eea886 Add .DS_Store to .gitignore
There is no reason to track .DS_Store files here: it's a metadata file
used by the Mac finder to hold info like where icons are located.  Add
it to .gitignore to avoid cluttering "git status" output.

Change-Id: I2c59228e48ed8d5ef125d8a694ca05d20b622723
2015-11-05 11:06:52 -08:00
David Pursehouse
d426c572ff Revert "Add UNIT_TEST_GERRIT_SITE to .gitignore"
This reverts commit e01fe1a43a4add2a628465858dd14f208539b7b2.

Change-Id: Ic9b13fe4f48d4050052b2ebb29b00c01994b89ac
2015-04-27 14:49:03 +09:00
David Pursehouse
e01fe1a43a Add UNIT_TEST_GERRIT_SITE to .gitignore
Change-Id: I150aef9a0b88e8409923e18215f4e9f053816f65
2015-04-23 18:09:36 +09:00
David Pursehouse
5d3dfe2d63 Add bin folder to .gitignore
In Eclipse preferences under the Team -> Git -> Project section, if the
"Automatically ignore derived resources by adding them to .gitignore"
option is enabled (which is the default), Eclipse will automatically
add "/bin/" to the .gitignore file.

Update the .gitignore file with this change to prevent Eclipse from
causing unexpected modified files in the git status.

Change-Id: I0cce9dd40183ff93b01cd0b45c383607d48d1af1
2015-04-08 11:40:19 +09:00
Shawn Pearce
16570463ab Add buck build soyc to output GWT split point report
The GWT compiler can output a report (or "story of your compile"),
describing the size of the JavaScript and which source classes
contributed to the overall download size. This is useful for
optimizing code splits in Dispatcher, and generally understanding
the impact of linking code together.

Only the "Split Point Report" is created.
The "Compiler Metrics" are not output.

The report is very slow to create, so it is not done by default.

Change-Id: I6ce86d65ee5f3e4bdba573d1f777ccc59767341d
2015-01-15 04:40:28 +00:00
Dave Borowitz
08180de4de Support AutoValue
AutoValue[1] is a lightweight annotation-processor-based library for
implementing classes with simple, obvious value semantics.

Add support for AutoValue to build rules and Eclipse project
generation. Buck does not currently have an officially-supported
interface for specifying annotation processor dependencies[2], so we
have to take the slightly ugly approach of monkey-patching
java_library and java_test to add annotation processor arguments to
each rule that requires annotation processing; hopefully this ugliness
can be reduced in the future.

[1] https://github.com/google/auto/tree/master/value
[2] https://github.com/facebook/buck/issues/85

Change-Id: I8b49d6f9f25d61688b667d964848c6ce106ae4ec
2014-11-08 08:31:08 -08:00
David Pursehouse
be108a3530 Merge branch 'stable-2.9'
* stable-2.9:
  Bash: Deploy plugin archetypes to Maven Central
  Fix documentation of how to publish artifacts to Maven Central
  Buck: Deploy plugin artifacts to Maven Central

Conflicts:
	.gitignore

Change-Id: I72aca7e13b55fbbe34bbf00d799a8a05dc96a955
2014-05-27 09:58:38 +09:00
David Ostrovsky
520f29c16a Buck: Deploy plugin artifacts to Maven Central
Switch deploying Gerrit extension and plugin API from Google storage
bucket to Maven Central.

To simplify the troubleshooting new trace option was added to
underlying python script. When environment variable VERBOSE=1
is set, then the mvn command is printed to stderr:

  VERBOSE=1 buck build api_deploy_oss
Change-Id: I9ebe44ec8aca91aa6b5514f561209e7c50377927
2014-05-26 22:06:42 +02:00
Luca Milanesio
0afb3473ae Ignoring vi swap file
Change-Id: I36dc970f9c6e8906550afa512a3b130a5edf2c2f
2014-04-25 18:40:35 +01:00
Shawn Pearce
4e1a8bc63d Update Buck
Buck changed export_deps from a boolean to be exported_deps, a list of
dependencies that are to be added to deps and also exported.  This
allows libraries to have dependencies for implementation use only, but
not expose them to callers for linkage.

exported_deps aren't transparently transitive anymore.  This mostly
impacts the plugin-api:lib rule.

This is the first time Gerrit is using upstream Buck with no patches.

- Java memory settings for Buck can now be supplied in a project
  specific file using `.buckjavaargs` in the root directory.  The file
  replaces the `.buckrc` previously supported by Gerrit's fork.

- Temporary directories for java_application() invoked from genrule()
  is now supplied as part of the arguments using $TMP.  This removes
  one of the patches Gerrit had for Buck.

- Unit tests use the system temporary directory during testing.  This
  can be faster if the temporary directory is a tmpfs.  Unfortunately
  not all passing tests clean up after themselves, making it possible
  to exhaust system memory and swap with useless tmpfs contents.
  Using the system temporary directory for tests removes another patch
  Gerrit had on top of Buck.

Change-Id: I3a9fe4aab0a33a8673df727e618122027a742638
2013-11-29 10:50:59 -08:00
David Pursehouse
13f628c77a Add org.eclipse.ltk.core.refactoring.prefs to .gitignore
Change-Id: I4c8c2f76cefd7fbcb3f208cc39e33fc5b67e28bd
2013-07-11 18:02:25 +09:00
Edwin Kempin
c23f1d757b Add gwt-unitCache to .gitignore
Change-Id: I2a6ad669daab2a92bce6561795ec4cb61628e101
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-06-14 10:15:25 +02:00
David Pursehouse
75b856954c Ignore .pyc files
Change-Id: I3d2223b1d9da06da24187e20f376557ece7c6f41
2013-06-03 15:25:49 +09:00
Shawn Pearce
9e4e243cfd Fix genantlr() to support buck caching
genrule() can only produce one output. This is critical to the way
buck caching works for build results. The solution I learned from
the Buck team is to have the genrule() produce a ZIP file containing
all of the outputs, and use a unique genrule() to extract each
output from the ZIP.

Developers can now opt-into the buck cache by writing a local
config file:

  cat >.buckconfig.local <<EOF
  [cache]
    mode = dir
    dir = buck-cache
  EOF

This can be very useful when switching commits around with GWT UI
code. If the UI code does not modify between commits there is no
rebuild time. If UI code does modify, rebuild time is reduced to
0 when switching back to a prior version you had previously built.

The cache needs local disk, so its not enabled by default.

Change-Id: If8f79637004fbc13ea37c419e5c9bb582a489ab5
2013-05-30 14:12:07 -07:00
Shawn Pearce
2c58882623 Upgrade buck to gerrit/410fcf34
Buck upstream now supports a daemon mode[1] which allows BUILD
files to be cached across invocations. This saves considerable
time on startup, especially for no-op incremental builds:

  no-op without buckd:  10.6s
  no-op with    buckd:   5.2s

However the current daemon implementation is insecure. Users
should only run it on dedicated machines where they trust all
other running processes.

Buck now requires Java 7. If it is missing the build will fail.

[1] http://facebook.github.io/buck/command/buckd.html
Change-Id: I55dec63e467f8f4db5a799296fb7f588ce4b2aa1
2013-05-30 13:56:50 +00:00
Shawn Pearce
f8ad4a49a5 Stop ignoring buck-cache, it moved to ~/.gerritcodereview/
Change-Id: I02a55c3e55d1e347e7fcadeba3ef60760c307464
2013-05-18 14:06:12 -07:00
David Pursehouse
fcf74f1e78 Add org.eclipse.m2e.core.prefs in .gitignore
Change-Id: Ia83ad27887123d654160094a15456e6543263376
2013-05-18 22:39:49 +09:00