Groovy scripts raises an error:
def a = \"test\"
+ \"test\"
+ \"test\"
Error:
No signature of method: java.lang.String.
You can tell Groovy that the statement should evaluate past the line ending by adding a pair of parentheses ( ... )
def a = ("test"
+ "test"
+ "test")
A second option is to use a backslash, \, at the end of each line:
def a = "test" \
+ "test" \
+ "test"
FWIW, this is identical to how Python multi-line statements work.