GroovyPluginProvider: Adjust to changed constructor of ServerPlugin

The constructor requires the plugin metrics prefix and the gerrit
runtime environment.

Change-Id: I195cc6f119b716a4eb3161ac72b2355e332a8fcc
diff --git a/src/main/java/com/googlesource/gerrit/plugins/scripting/groovyprovider/GroovyPluginProvider.java b/src/main/java/com/googlesource/gerrit/plugins/scripting/groovyprovider/GroovyPluginProvider.java
index 7c07387..0012627 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/scripting/groovyprovider/GroovyPluginProvider.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/scripting/groovyprovider/GroovyPluginProvider.java
@@ -18,6 +18,7 @@
 import com.google.common.io.Files;
 import com.google.gerrit.extensions.annotations.Listen;
 import com.google.gerrit.extensions.annotations.PluginName;
+import com.google.gerrit.server.config.GerritRuntime;
 import com.google.gerrit.server.plugins.InvalidPluginException;
 import com.google.gerrit.server.plugins.ServerPlugin;
 import com.google.gerrit.server.plugins.ServerPluginProvider;
@@ -60,15 +61,18 @@
   public ServerPlugin get(Path srcFile, FileSnapshot snapshot, PluginDescription description)
       throws InvalidPluginException {
     GroovyPluginScriptEngine scriptEngine = scriptEngineProvider.get();
+    String pluginName = getPluginName(srcFile);
     return new ServerPlugin(
-        getPluginName(srcFile),
+        pluginName,
         description.canonicalUrl,
         description.user,
         srcFile,
         snapshot,
         new GroovyPluginScanner(getPluginName(srcFile), scriptEngine, srcFile),
         description.dataDir,
-        scriptEngine.getGroovyClassLoader());
+        scriptEngine.getGroovyClassLoader(),
+        "groovy/" + pluginName,
+        GerritRuntime.DAEMON);
   }
 
   @Override