https://github.com/gerritcodereview/plugins_scripting_scala-provider
Allows the load Gerrit plugins implemented as Scala scripts - (mirror of http://gerrit.googlesource.com/plugins%2Fscripting%2Fscala-provider)
https://github.com/gerritcodereview/plugins_scripting_scala-provider
Last synced: 8 months ago
JSON representation
Allows the load Gerrit plugins implemented as Scala scripts - (mirror of http://gerrit.googlesource.com/plugins%2Fscripting%2Fscala-provider)
- Host: GitHub
- URL: https://github.com/gerritcodereview/plugins_scripting_scala-provider
- Owner: GerritCodeReview
- License: apache-2.0
- Created: 2015-12-10T09:44:36.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T13:32:27.000Z (about 1 year ago)
- Last Synced: 2025-02-12T14:48:23.252Z (about 1 year ago)
- Language: Java
- Size: 104 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Gerrit Scala Provider Plugin
=============================
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".