Gradle + eclipse plugin+linked source/

Hello, I’m using Eclipse gradle plugin. I create new gradle project, then delete original build.gradle and link new build.gradle (I also link source). But It does not work (Gradle works independently of my new file, I suppose it for some reason uses default built-in build.gradle of the plugin). Does not work = doesn’t execute anything from new file/doesn’t add dependencies to project tree/if I specially make a syntax mistake in it - no sense. What can I do?


To say clear, in the post above by “link” I meant links created by Eclipse IDE (New File->…->create link or Import file->as link). If I have, for example, in the workspace/my_project root dir build.gradle linked by means of “ln -s” - it works.

The same thing with linked src directories: If i link src with ln -s -> all ok, gradle compile it etc…but If i link within eclipse (so, there’s no src dir in workspace/my_project in the filesystem)- it generates jar with only one manifest file (no classes). Thank you!

Eclipse linked resources are a very special concept. As far as I can tell they were created to give you possibility to include resources into your project so that everything what belongs to a project is under one resource tree inside Eclipse. They were implemented in a cross-platform way (there were no symlinks on Windows at that time) but external tools know nothing about them. And because Gradle is invoked in an external process it is not aware of your linked resource.