I use Eclipse Mars.2 (4.5.2) with Buildship 1.0.14. Gradle version is 2.12.
I import my gradle project into the Eclipse.
No .project
or .classpath
files exist before import. All modules imported successfully. But almost every project with java code has missed dependencies and showing red "X".
If you open a java file with error, you can see that Eclipse can't resolve the import. But if you open imported class by name, it can find it in the other module's dependency.
Gradle -> Refresh project doesn't help.
The necessary dependencies declared in the root build.gradle
in this way:
ext.library = [
swagger: [
[ group: "io.swagger", name: "swagger-annotations", version: "1.5.3" ],
[ group: "io.swagger", name: "swagger-core", version: "1.5.3" ],
[ group: "io.swagger", name: "swagger-jaxrs", version: "1.5.3" ]
]
]
and in the modules I declare it like this:
dependencies {
providedCompile library.swagger
}
When you execute gradle build
from command line or even from Eclipse, the build is successful.
The small project example to reproduce this problem can be found on github (thank to RaGe for participating in that).
Could you help me to resolve this issue with Eclipse?