commit | 904df7975413cb7273908f0587ca5327935650c3 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Tue Feb 11 23:02:47 2025 +0000 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Tue Feb 11 23:02:47 2025 +0000 |
tree | 993cfc2bd7bb9b168ba6cabf6fc51edb928c6ae8 | |
parent | 9a9304e9d2727065f3314aca461f5fd356810a47 [diff] |
Adapt plugin scanner to the latest master avoiding Enumeration The latest Gerrit master moved away from Enumeration following the switch to Java 21 and adopted Stream instead. Change-Id: Ic9e3fd2f87214735d2e6b1770ca5102f791336d4
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”.