Add Eclipse linked folders to Gradle Build script

Hi,

we are trying to build our multi project (WebProject) with Gradle.
Our Eclipse project contains many linked source folders which are not
located in the project path.

We tried to add the eclipse/project/linkedResource from
the Eclipse Plugin with the specific paths. But the build fails always
with the statement that it cannot find a class which is located in one resource.

Here is a project structure which is similar to ours:

MyWebProject
|----Java Resources
|     |-src
|     |  |- package1 //JavaFiles
|     |  |- package2 //JavaFiles
|     |  |- linked
|     |  |    |- externalSourceFolder1 //LINKED JavaFiles
|     |  |    |- externalSourceFolder2 //LINKED JavaFiles
|     |  |- package3 //JavaFiles
|     |-test
|        |- package1 //JavaFiles
|        |- package2 //JavaFiles
|        |- linked
|        |   |- externalTestFolder1 //LINKED JavaFiles
|        |   |- externalTestFolder2 //LINKED JavaFiles
|        |- package3 //JavaFiles
|
|----WebFiles
     |-css
     |  |- cssFolder1 //CSSFiles
     |  |- cssFolder2 //CSSFiles
     |- linked
           |- externalCSSFolder1 //LINKED CSSFiles
           |- externalCSSFolder2 //LINKED CSSFiles

The file system looks like this

C:\MyWorkspace\MyWebProject\src\package1\
C:\MyWorkspace\MyWebProject\src\package2\
C:\MyWorkspace\MyWebProject\src\package3\
C:\MyWorkspace\MyWebProject\test\package1\
C:\MyWorkspace\MyWebProject\test\package2\
C:\MyWorkspace\MyWebProject\test\package3\
C:\MyWorkspace\MyWebProject\WebFiles\css\cssFolder1\
C:\MyWorkspace\MyWebProject\WebFiles\css\cssFolder2\

C:\MyWorkspace\ExternalSource1\src\extenalSourceFolder1\
C:\MyWorkspace\ExternalSource1\test\extenalTestFolder1\
C:\MyWorkspace\ExternalSource1\WebFiles\css\externalCSSFolder1\

C:\MyWorkspace\ExternalSource2\src\extenalSourceFolder2\
C:\MyWorkspace\ExternalSource2\test\extenalTestFolder2\
C:\MyWorkspace\ExternalSource2\WebFiles\css\externalCSSFolder2\

And finally this is how the Gradle build script looks like

apply plugin: 'war'
apply plugin: 'eclipse' 

webAppDirName = 'WebContent'

sourceSets {
    main {
        java {
            srcDir 'src'
        }
    }
}

eclipse {
    project {         
        linkedResource name: 'externalSourceFolder1', type: '2', location: 'C:\MyWorkspace\ExternalSource1\src\extenalSourceFolder1\'
        linkedResource name: 'externalTestFolder1', type: '2', location: 'C:\MyWorkspace\ExternalSource1\test\extenalTestFolder1\'

        linkedResource name: 'externalSourceFolder2', type: '2', location: 'C:\MyWorkspace\ExternalSource2\src\extenalSourceFolder2\'
        linkedResource name: 'externalTestFolder2', type: '2', location: 'C:\MyWorkspace\ExternalSource2\test\extenalTestFolder2\'

        linkedResource name: 'externalCSSFolder1', type: '2', location: 'C:\MyWorkspace\ExternalSource1\WebFiles\css\externalCSSFolder1\'
        linkedResource name: 'externalCSSFolder2', type: '2', location: 'C:\MyWorkspace\ExternalSource2\WebFiles\css\externalCSSFolder2\'
    }
}

It would be nice if someone may help us.

Thanks in advance and best regards!