commit | c7b26e51b28d5d6f5a61dd832ffb6f3da325f492 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Fri Jul 20 00:38:47 2018 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Fri Jul 20 00:39:32 2018 +0100 |
tree | d0f6ffe84689a678cdaee935464702fe37821bd4 | |
parent | 60607b08383cf297e6df7d13f3fec2ae6d4e750b [diff] |
ScalaPluginProvider: Adjust to new constructor of ServerPlugin The constructor requires the plugin metrics prefix and the gerrit runtime environment. Change-Id: Ie20c55d11ce17b379a99311af62a11b7bc97405c
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”.