Skip to content

Commit 179e9a9

Browse files
authored
[groovyscripting] Described a way for code reuse (openhab#16361)
Signed-off-by: Oleg Andreych <kjiec4@gmail.com>
1 parent 8e48c8b commit 179e9a9

File tree

1 file changed

+7
-0
lines changed
  • bundles/org.openhab.automation.groovyscripting

1 file changed

+7
-0
lines changed

bundles/org.openhab.automation.groovyscripting/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ log:set DEBUG org.openhab.core.automation
2121

2222
For more information on the available APIs in scripts see the [JSR223 Scripting]({{base}}/configuration/jsr223.html) documentation.
2323

24+
## Code reuse
25+
26+
One can place *.groovy files with Groovy classes under `automation/groovy` configuration directory.
27+
Those classes can be imported in JSR-223 scripts or the UI rules action with the usual Groovy `import` statement.
28+
29+
To apply shared code changes, one has to restart the `openHAB Core :: Bundles :: Automation` bundle on the Console or an openHAB instance altogether.
30+
2431
## Script Examples
2532

2633
Groovy scripts provide access to almost all the functionality in an openHAB runtime environment.

0 commit comments

Comments
 (0)