stempler / bnd-platform

Build OSGi bundles and Eclipse Update Sites from existing JARs, e.g. from Maven repositories (Plugin for Gradle)
Apache License 2.0
79 stars 30 forks source link

create eclipse plugin #120

Closed fer-marino closed 2 weeks ago

fer-marino commented 3 months ago

hi, so I'm pretty new to all this stuff and I have to port an old eclipse plugin with an ant build file to gradle. With maven I've managed to do it with tycho, but this part I would like to do it with gradle and this place seems the best resource for it.

With maven all I have to do i use the tycho compiler plugin along with the tycho platform plugin. I think bnd-platform can be used to replace the tycho-platform plugin, but what about the tycho-compiler? what I need is simply to add to the bundle the result of the compilation of this library along with the platform information. How do I do that? In thyco most of the information are defined in a custom MANIFEST.MF file, while here my understanding is that it is autogenerated.

cheers, Fernando

stempler commented 3 months ago

I think are two basic approaches:

  1. bnd-platform creates a p2 repo that can be used in Eclipse or another (Maven Tycho) build to install/include the plugin
  2. bnd-platform creates a p2 repo that provides the dependencies you need (in addition to Eclipse dependencies) in a Maven Tycho build

On 1.: This can work well if you can compile your plugin normally with Gradle, using the default dependency mechanism. There is also the unpuzzle Gradle plugin that could help with creating Maven dependencies from existing Eclipse p2 repos (not maintained, but there is some activity on forks).

If the plugin is built with Gradle, you could either use a published version of it from a Maven repository in bnd-platform or have bnd-platform in a separate subproject, that can use your plugin project as project dependency.

On 2.: I'm not aware of any alternatives to Maven Tycho (there used to be a couple, but AFAIK Maven Tycho is the only one still maintained). What we do in one case is generating manifest and pom files with Gradle and calling Maven Tycho from Gradle, but that's something we set up in the early days of Tycho and especially if you only have one plugin it might be easier to just use Tycho directly.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 2 weeks ago

This issue has been automatically closed due to inactivity. If it is still valid, please post a comment.