12 Commits

Author SHA1 Message Date
Shawn Pearce
b636c94a7e Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
  Escape dollar sign in plugin manifest entries
2014-03-20 10:15:25 -07:00
David Ostrovsky
73c3ad9e56 Escape dollar sign in plugin manifest entries
Escape dollar sign in plugin manifest entries, to prevent that
it is interpreted by the shell and thus get removed.

Change-Id: Iefd8abdcd207cb985f8156c7e41c094c1aa12b27
2014-03-19 00:43:21 +00:00
David Pursehouse
cfd89cea70 Merge branch 'stable-2.8'
* stable-2.8:
  Update replication plugin
  Enable creating new branch and push local new commits in one step.
  Add Implementation-Vendor default manifest entry
  Fix incompatibility between "Rebase if Necessary" and "copy*Score*"
  Fix submit rule evaluation for non blocking labels
  Set uploader to current user in "patchset-created" event upon rebasing
  Guard against diff.mnemonicprefix in commit-msg hook

Conflicts:
	gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/BUCK
	gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/AddReviewerInput.java
	gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeJson.java
	gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/RebaseIfNecessary.java

Change-Id: Ie59a530fe2c0fe66244d010e01e3cdf41de150f0
2014-03-04 12:29:00 +09:00
David Ostrovsky
82fc620c31 Add Implementation-Vendor default manifest entry
Change-Id: I40039bba02ed0169df02bc1d335606dd34473366
2014-03-01 13:10:45 +00:00
David Ostrovsky
1ef2557f6f Buck: Add support for non transitive plugin dependencies
In some cases it might be useful to be able to pass dependencies as non
transitive dependencies, that not included in final plugin binary.

Why? When plugin dependencies are needed in both bootstrap classpath and
in plugin then they must be put in $gerrit_path/lib dir. Having them in lib
and inside the plugin doesn't make much sense.

This change exposes compile_deps parameter to the gerrit_{plugin|extension}
methods. It is possible to create both versions of the plugin: with and without
dependencies.

  gerrit_plugin(
    name = 'javamelody',
    srcs = glob(['src/main/java/**/*.java']),
    resources = glob(['src/main/resources/**/*']),
    manifest_entries = [
      'Gerrit-PluginName: javamelody',
      'Gerrit-Module: com.googlesource.gerrit.plugins.javamelody.Module',
      'Gerrit-HttpModule: com.googlesource.gerrit.plugins.javamelody.HttpModule',
    ],
    deps = [
      '//plugins/javamelody/lib:javamelody',
      '//plugins/javamelody/lib:jrobin',
    ],
  )

  gerrit_plugin(
    name = 'javamelody-no-deps',
    srcs = glob(['src/main/java/**/*.java']),
    resources = glob(['src/main/resources/**/*']),
    manifest_entries = [
      'Gerrit-PluginName: javamelody',
      'Gerrit-Module: com.googlesource.gerrit.plugins.javamelody.Module',
      'Gerrit-HttpModule: com.googlesource.gerrit.plugins.javamelody.HttpModule',
    ],
    compile_deps = [
      '//plugins/javamelody/lib:javamelody',
      '//plugins/javamelody/lib:jrobin',
    ],
  )

Change-Id: Ia274dbeb18de8807f0ab1edf7144f12ff0d02d74
2013-12-09 23:56:37 +01:00
Shawn Pearce
05cb053378 Save GWT compile time by avoiding javac
GWT only needs the rebind code for CSS and ServerLinker to be
precompiled as bytecode. Save build time by passing no source
files to the java_library() used by gwt_module().

For a full draft build of ui_safari this cuts the refresh time
down from 32.015s to 26.158s on my MacBook. Saving 6s on each
UI reload adds up during development.

The common annotations need to be provided as bytecode, avoiding
spurious warnings from GWT when there is a Java syntax error.

Change-Id: I37826498650c65c05303e7d4d1177d05781c56f6
2013-11-30 11:06:50 -08:00
David Ostrovsky
b4b30cb937 Buck: Bump java default source and target level to 7
Buck lacks a feature to set java source level and target level per project
base, i. e. in .buckconfig file under java section.

The only method that currently is supported and described in the
documentation is to pass custom levels to java_library and java_test methods.

That would work, but that approach would require to touch dozens of files.

Second approach could be to just patch system wide Buck with this patch[1].
However that is not really an option because in this case the increased
java source and target level applies on all projects and branches.
Particularly it is undesirable to build Gerrit 2.8 stable branch or other
projects that were migrated to Buck (e. g. JGit) with increased java source
and target level.

This change redefines the standard definitions of java_test() and
java_library() methods and increases the java source and target level in the
new defined functions. With the combination of "include = default.defs"
construct in .buildconfig file it is garanteed that all BUCK files first
"see" the redefined methods.

Disadvantage of the approach is that every time the original method
definitions are changed in upstream Buck (i. e. new paramters are introduced)
this patch must be changed too.

The best approach would be to extend Buck and enable definition of source and
target level per project base (in .buckconfig file).

[1] https://github.com/facebook/buck/pull/67

Change-Id: Ifaba1eb41e9ac2f033e704a75723f3595e1c1ee5
2013-11-28 23:34:05 +01:00
Shawn Pearce
154d4181a8 Fix plugin references to moved :plugin-api
The plugin api moved into the gerrit-plugin-api package.
Change the reference created by gerrit_plugin() to match.

Change-Id: I390a22f512835847367ae2993a7a9bddf9d11b5c
2013-11-24 13:45:30 -08:00
David Ostrovsky
bb360ebe06 Buck: generate javadocs for plugin and extension API
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
2013-11-24 02:04:51 +01:00
David Ostrovsky
c53827816d Buck: Add support for gerrit GWT plugins
This changes extends gerrit_plugin function with additional gwt_module
parameters. When passed, GWT application is created. Assumtion is met,
that this application depends on gerrit-plugin-gwtui module.

With this change Gerrit GWT plugins can be build with Buck:

  MODULE = 'com.googlesource.gerrit.plugins.cookbook.HelloForm'

  gerrit_plugin(
    name = 'cookbook-plugin',
    srcs = glob(['src/main/java/**/*.java']),
    resources = glob(['src/main/**/*']),
    gwt_module = MODULE,
    manifest_entries = [
      'Gerrit-PluginName: cookbook',
      'Gerrit-Module: com.googlesource.gerrit.plugins.cookbook.Module',
      'Gerrit-HttpModule: com.googlesource.gerrit.plugins.cookbook.HttpModule',
      'Gerrit-SshModule: com.googlesource.gerrit.plugins.cookbook.SshModule',
    ]
  )

Change-Id: I4b131c7c2672675d99457651fcee63bf4f149c2f
2013-11-15 09:53:24 +01:00
Shawn Pearce
55583ac43e Update buck
$TMP, $DEPS, $SRCS, $OUT are no longer supplied by Buck in the
environment unless they appear in the command line.  Pass $TMP
where it was assumed to be magically supplied. This allows steps
to continue to use buck-out/gen/ for temporary storage instead of
polluting the system /tmp.

Change-Id: Iea8380e5f93fa16ec77457eb76404832bde93a39
2013-10-18 17:06:56 +00:00
Shawn Pearce
5047911dba Rename DEFS files to *.defs
The build system used mixed names for essentially the same things.
Rename all DEFS files to *.defs matching the handful of other files
that are already using this convention.

Change-Id: I3269bd5db5d8d83f5e192ea910f19431c2a4a1cf
2013-07-30 17:18:33 +00:00