Problem with whenMerged closure in eclipse task configuration


(Mark Youwanes) #1

I’m getting an error in my build.gradle file when I try to access the whenMerged hook, as follows:

apply plugin: ‘java’ apply plugin: ‘groovy’ apply plugin: ‘eclipse’ … eclipse {

classpath {

file {

whenMerged { classpath ->

}

}

}

}

Error I’m getting is:

  • What went wrong: A problem occurred evaluating root project ‘ImportExport’. Cause: Could not find method whenMerged() for arguments [build_6uoh6huddii2uuv80n0dp2vtc7$_run_closure5_closure11_closure12_closure13@122eed1] on org.gradle.plugins.ide.eclipse.model.EclipseClasspath_Decorated@43329e.

(Mark Youwanes) #2

Looks like I was using milestone 3, and so when I switched to the latest (milestone 7), it worked.