I would like to read dependencies from an eclipse .classpath file but never write back to it. Essentially, the .classpath become the master dependency definition file. - In the future, I would probably want to define dependencies in build.gradle to be able to override those defined in .classpath.
I can apply the eclipse plugin and see the eclipseClasspath task but can’t quite work out how to do it.
I know this sounds horrible, please don’t ask me why!
I was hoping that the Eclipse plugin would do the heavy lifting!
The EclipsePlugin seems to understand the structure of the .classpath file, eg. org.gradle.plugins.ide.eclipse.model.Classpath.groovy. I was wondering if I could reuse the logic in the plugin to read the file in?
I haven’t tested that, but hopefully it gets you on the right path. You’ll likely have to do some digging through the source code if the above is not enough.