Cannot infer groovy classpath when using gradle : <p>I have a trivial Gradle project:</p>

<pre><code>apply plugin: 'groovy'
apply plugin: 'application'

mainClassName = 'HelloWorld'
</code></pre>

<p>With one Groovy source file in <code>src/main/groovy</code>:</p>

<pre><code>public class HelloWorld {
    public static void main(String[] args) {
        print "hello world"
    }
}
</code></pre>

<p>I type <code>gradle run</code> and get the following error:</p>

<pre><code>FAILURE: Build failed with an exception.

* What went wrong:
Cannot infer Groovy class path because no Groovy Jar was found on class path: [/Users/jzwolak/files/experimenting/gradle/groovy-project/build/classes/java/main]

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED in 0s
1 actionable task: 1 executed
</code></pre>

<p>How do I configure the Groovy classpath for Gradle?</p>

<p>I have Groovy at <code>/usr/local/opt/groovy/libexec/</code></p>
