Groovy closures in App Manifest

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User13353
Level 1
Level 1
Hi again,

I'm having a little trouble with using Groovy closures in the App Manifest.
Here's whay I'm trying to do:

def generateFiles() {
def static_templates = [
'foo.c',
'foo.h',
]
static_templates.each{ name -> copy name, name }
}


When I add the App to my DAVE CE project and click 'Generate Code', I get a 'java.lang.NoClassDefFoundError'.
Am I doing something wrong or is it for some reason not possible to use Groovy Closures in the generateFiles() method?
I have however been able to use a similar pattern and closures in the App constructor.


Kind regards

Sebastian
0 Likes
0 Replies