Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

groovy block comment and special chars in string

Gradle

/*

def v = "**/*.xml"

*/

Groovy think the */ inside the string is the end of block comment.

like image 395
eastwater Avatar asked Dec 08 '25 11:12

eastwater


1 Answers

If you are commenting out a block of (syntactically correct) code, I find it easier to use if(false) {...} to avoid this problem.

like image 75
pavon Avatar answered Dec 11 '25 13:12

pavon