Simplified plugin scanner using a base AbstractPreloaded scanner

Use the new Gerrit AbstractPreloadedPluginScanner to simplify
the auto-generation of Plugin manifest and auto-discover of 
annotated classes.

Change-Id: I2f34869111be5aef5bff99298b38c1bec2f60d4a
1 file changed
tree: a702d8837aed2c2029098ef89e341a6130e6e03f
  1. src/
  2. BUCK
  3. LICENSE
  4. LICENSE-scala
  5. README.md
README.md

Gerrit Scala Provider Plugin

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

To test this series must be applied on top of Gerrit master [1].

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”.