Allows the load Gerrit plugins implemented as Scala scripts

Clone this repo:
  1. 50bfa50 Remove buck build by Paladox none · 3 months ago master
  2. f39e2d4 Add support for Bazel in Gerrit tree build by Paladox none · 3 months ago
  3. bf79f89 Use throw in catch block by Paladox none · 3 months ago
  4. 1a32786 Adapt to Gerrit 2.14 and Java 8 by Luca Milanesio · 7 months ago
  5. c8feaa8 README: Remove the link to pending changes for Gerrit master by Sebastian Schuberth · 12 months ago stable-2.12 stable-2.13

Gerrit Scala Provider Plugin

This plugin provides Scala runtime environment for Gerrit plugins in Scala.

To build link this directory under Gerrit's tree plugins directory and run:

  buck build plugins/scala-provider:scala-provider

The resulting artifact can be found under:

 buck-out/gen/plugins/scala-provider/scala-provider.jar

A sample Scala hello world script is:

  import com.google.gerrit.sshd._
  import com.google.gerrit.extensions.annotations._

  @Export("scala")
  class ScalaCommand extends SshCommand {
    override def run = stdout println "Hello from Scala!"
  }

Copy and past the above sample Scala fragment into the file $GERRIT_SITE/plugin/hello-1.0.scala.

The “hello” plugin version 1.0 will be automatically loaded into Gerrit and will provide a new SSH command “hello scala”.