-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
If a variable has an undeclared type it goes into the script binding. The binding is visible to all methods which means data is shared.
evaluate() is a helper method to allow the dynamic evaluation of groovy expressions using this scripts binding as the variable scope.
In a variable binding, you can declare a closure which accepts no argument and must be restricted to calls without arguments.
With all of that in mind, here is your script working as intended.
evaluate ("test = { -> println \"Test is successful!\" }")
test()
Metadata
Metadata
Assignees
Labels
No labels