commit | c2f50a912e73acbdb9dc3562b63c56c613c27b4d | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Fri Apr 25 09:07:21 2014 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Fri Apr 25 09:07:21 2014 +0100 |
tree | eae3be280b8bfd83316f811abe568fa591eecdb3 | |
parent | 72a204dd63d007578ad8944bafbb773bbc19d474 [diff] |
Alignment of ServerPluginProvider to latest interfaces Adoption of Optional<T> and removal of name in the ServerPluginProvider. Aligned with the refs/changes/70/56270/3 on Gerrit Change-Id: Icfe9f1ece3a58002db30d64236daaaf031575ed2
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”.