commit | 1a32786027b1ab81ea1080c629f6a4cbbc465126 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Sun Oct 16 22:31:32 2016 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Sun Oct 16 22:31:32 2016 +0100 |
tree | 001e22854758388b97e885f90f8f1c3c22960fee | |
parent | c8feaa849dcbdc3772a397b50bc31aa5b1a719b5 [diff] |
Adapt to Gerrit 2.14 and Java 8 Change-Id: I78f9c208ffaa87bc24a61784ed37c20722034f47
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”.