gradle-trust-all icon indicating copy to clipboard operation
gradle-trust-all copied to clipboard

groovyClasspath Build Error

Open someben opened this issue 7 years ago • 1 comments

Thanks for working on this plugin. I get this error when trying to build from a git clone:

$ gradle build
:compileJava UP-TO-DATE
:compileGroovy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> 'compileGroovy.groovyClasspath' must not be empty. It is either configured automatically by the 'groovy-base' plugin, or can be set manually.

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

BUILD FAILED

Total time: 4.37 secs

someben avatar Apr 20 '17 19:04 someben

I had this problem as well on WSL. It seems that Groovy usually installs by default but, alas, Windows is different.

The solution for me was to modify the provided build.gradle folder to read thusly:

apply plugin: 'groovy'

repositories {
    mavenCentral()
}
dependencies {
    compile 'org.codehaus.groovy:groovy-all:2.0.6'
    compile gradleApi()
    compile localGroovy()
}
sourceCompatibility = '1.7'
targetCompatibility = '1.7'

This caused gradle to download and compile the groovy plugin before building. YMMV.

kalexmills avatar Dec 13 '17 23:12 kalexmills