I’m trying to migrate a Maven1 build to Gradle. This is my first real Gradle build, so I’m probably doing something wrong. The issue I face is that there are several directories with their related Ant style matching patterns. Inspired by the users manual (Chapeter 16.3 File Trees: http://www.gradle.org/docs/current/userguide/working_with_files.html#sec:file_trees) the best I can come up with is the build file below. Unfortunately this causes Gradle to fail with the message

Could not find method main() for arguments [build_4fd8glkjbn7dka51fkr3r4chr3$_run_closure1_closure2@4959f789] on root project ‘gradleq’.

By the way this is easily reproducible, no other files needed. My Gradle version is 2.0.

My question is either: What am I doing wrong? Alternatively: How can I get two resource directories with associated matching patterns?