| commit | d840bf9744fdb7a406c50134b3ec5412de18e8dd | [log] [tgz] |
|---|---|---|
| author | Luca Milanesio <luca.milanesio@gmail.com> | Thu Mar 05 12:04:14 2015 +0000 |
| committer | Luca Milanesio <luca.milanesio@gmail.com> | Thu Mar 05 12:04:14 2015 +0000 |
| tree | f696e4614a0cde3ffe6e605ef4d1401f732f813d | |
| parent | 518555b94b0423a93942ff96d37bcca3a59262a9 [diff] |
Bump to 2.12-SNAPSHOT and use of java.nio.Path Change-Id: I72fb8c5cfc2f37096f0b2892b11d0baa832b559e
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”.