The eclipse target generates duplicate <classpathentry/> entries in .classpath when run with gradle 2.6 or higher. See for example the xpp3 classpathentry in the following:
This results in eclipse reporting “Build path contains duplicate entry … for project …”.
Happens with gradle 2.6 and 2.7. Does not happen with gradle 2.4. Not sure if this qualifies as regression (e.g. GRADLE-1953). The project in question is https://github.com/igniterealtime/Smack
Thanks for the bug report. I took a look at this and I was able to reproduce the problem and I can see the duplicate in smack-tcp/.classpath.
This might be a bug in version handling since when I change the xpp3 library dependency to 'xpp3:xpp3:1.1.3.3' in smack-core/build.gradle, no duplicate gets produced in the .classpath files.
What catched my eye was the letter in the version of xpp3 dependency 'xpp3:xpp3:1.1.4c'.
I assume that the xpp3 dependency is the only duplicate and it could be related to a bug in version handling in Gradle.
The problem seems to occur with the dependency testCompile project(':smack-core').sourceSets.test.runtimeClasspath. Perhaps you could find a way to workaround the problem until this bug is fixed.
While this fixes the issue, it causes gradle check to fail with
:smack-experimental:compileTestJava
/home/flo/data/code/smack/smack-experimental/src/test/java/org/jivesoftware/smackx/carbons/CarbonTest.java:21: error: package org.jivesoftware.smack.test.util does not exist
import static org.jivesoftware.smack.test.util.CharsequenceEquals.equalsCharSequence;
^
/home/flo/data/code/smack/smack-experimental/src/test/java/org/jivesoftware/smackx/carbons/CarbonTest.java:21: error: static import only from classes and interfaces
import static org.jivesoftware.smack.test.util.CharsequenceEquals.equalsCharSequence;
^
2 errors
:smack-experimental:compileTestJava FAILED
So the code from smack-core/src/test/java is not available to smack-experimental test runtime. I believe that is why I added the dependency this way in the first place.