Using Gradle to build an eclipse plugin: Can we reuse information from the Plugin Manifest and classpath files?

Using eclipse to build a eclipse plugin:

We are currently using native eclipse PDE for building an eclipse plugin. We plan to switch to using Gradle. My question is

a) Do I have to manually add all the dependent plugins specified in the , to build.gradle?

b) References to other jars, specified in the classpath, does this need to be added manually too?

Or is there a way we can make gradle use the existing information in the fiel and the .classpath of eclipse

Thanks for any help

There is a thread where you can find links to some attempts to create a Gradle plugin that will perform PDE build. I do not know how stable it is.

re a): depends on what you want to do. I would try to generate manifest (or its parts) from dependencies rather than going in opposite directions.

re b): this is related to above. Using dependency resolution support from Gradle seems better choice to me.

Using .classpath: then you will have to version them in your VCS for your project. Some projects do this others don’t.

As long as we do not have a PDE builder plugin with Gradle, we have to add Jar-dependencies to Gradle scripts (whereas in you have package definitions). So there will be a gap between Eclipse PDE build and Gradle build. You can accept this and just say: ok, development is done within Eclipse; developpers define Manifest definitions and put plugin dependencies as project or jar dependencies into Gradle scripts.

Or, you build some intelligent tool which takes your Manifest files, analyze their dependency declarations and convert them to the Gradle view of dependencies.

There is no other way around: you cannot generate Eclipse Manifest definitions from the Gradle view because Gradle has the traditional Java classpath view, not the OSGI/Eclipse view of dependencies.