Init script not found on Windows

set GRADLE_USER_HOME=D:\foo

D:\foo.gradle\init.gradle:

allprojects {

apply plugin: ‘eclipse’ }

C:\src\project\bar> gradle eclipse … Task ‘eclipse’ not found in project ‘:bar’ …

C:\src\project\bar> gradle eclipse --init-script=%GRADLE_USER_HOME%.gradle\init.gradle: … BUILD SUCCESSFUL

What am I doing wrong?

%GRADLE_USER_HOME%

contains

caches

and

daemon

and all the other stuff you would expect to go there.