[groovyscripting] Update Groovy to 4.0.9 and support slurpers (#14499)

Updates Groovy from 4.0.7 to 4.0.9.

For release notes, see:

https://groovy-lang.org/changelogs/changelog-4.0.8.html
https://groovy-lang.org/changelogs/changelog-4.0.9.html

Adds dependencies and service loader config so JSON, XML and YAML can be more easily parsed using the JsonSlurper, XmlSlurper and YamlSlurper.

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2023-03-11 21:15:06 +01:00
committed by GitHub
parent ac7993d329
commit 59b3ed33df
11 changed files with 292 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ public class GroovyScriptEngineFactory extends AbstractScriptEngineFactory {
.flatMap(List::stream) //
.collect(Collectors.toUnmodifiableList());
private final GroovyClassLoader gcl = new GroovyClassLoader();
private final GroovyClassLoader gcl = new GroovyClassLoader(GroovyScriptEngineFactory.class.getClassLoader());
public GroovyScriptEngineFactory() {
String scriptDir = OpenHAB.getConfigFolder() + File.separator + FILE_DIRECTORY;