[GRADLE-253] Eclipse task treats resources as source folders Created: 03/Oct/08 Updated: 04/Jan/13 Resolved: 09/May/11
When doing a
a .classpath is being generated that contains the line
This causes Eclipse to copy all resources to build/classes, which is unnecessary. If the eclipse task would generate
instead, Eclipse would treat the resources directory as a class folder and everything (including using Gradle to generate a JAR file) would work as well.
|Comment by Levi Hoogenberg [ 06/Oct/08 ]|
Note that class folders would have to be defined after output folders, otherwise resources copied by the Resources task(s) take precedence over the original files.
|Comment by Hans Dockter [ 27/Jul/10 ]|
The drawback of using classpath for resources is that exclude/include patterns can't be used. We should discuss this issue on the dev list. The good news is that you can fully customize this now. So you can tell the EclipseClasspath task to remove the source folder and add a classpath entry for resources. We do this in the Gradle build itself (as we have Java sources in one of the resources dir which should not be compiled).
|Comment by Szczepan Faber [ 09/May/11 ]|
Another drawback of using classpath for resources is that it makes them harder to browse in Eclipse. The 'referenced libraries' container is usually quite big due to number of dependencies.
Given above, we would prefer to keep eclipse plugin creating source folders. It is also consistent with how IDEA plugin works. Sorry