Gradle Build sample fails with "You must assign a Groovy library to the 'groovy' configuration." -


i have build.gradle file (from custom plugin example in manual) reads:

apply plugin: 'groovy'  dependencies { compile gradleapi() compile localgroovy() } 

but when run get:

$ gradle build :compilejava up-to-date :compilegroovy  failure: build failed exception.  * went wrong: execution failed task ':compilegroovy'. > must assign groovy library 'groovy' configuration.  * try: run --stacktrace option stack trace. run --info or --debug option more log output.  build failed 

any idea missing?

ensure have both:

apply plugin: 'groovy' 

and use groovy keyword in dependencies section (rather using compile keyword):

dependencies {    groovy 'org.codehaus.groovy:groovy-all:2.0.8 } 

all credit this blog.


Comments