Gradle non-Bnd Workspace Build and Eclipse bnd project nature

I wonder about the compatibility between the gradle “non-Bnd Workspace Build” and the “Eclipse bnd project nature”.

When using the former, should or can the latter be configured in Eclipse? My guess is that the bndtools.core.bndbuilder that comes with the bnd project nature cannot work properly, at least if you use properties passing from gradle to bnd with (unless there is some magic). Yet you can still open *.bnd with the editor from bndtools and see the “build”-tab.

Should I add the “bnd project nature” to the subprojects in my “non-Bnd Workspace build” or not?

Gradle is mostly used as a wrapper for bnd which is a Build tool that works without gradle. Bndtools does not really know anything about Gradle and thus ignores all gradle configs.

We configure everything in bnd and use gradle specific instructions only for „non IDE“ build steps, like trigger a docker build. We haven’t found anything we couldn’t achieve really achieve with bnd functionality till now.

What specific settings do you use gradle for? If it is just properties you use, you can add something like

-include: ${.}/…/

To your build.bnd to have them available. If it’s something beyond this @bjhargrave might be able to give more or better advice.

The Bndtools Builder is an Eclipse incremental builder for Bnd Workspace projects. It does not know or support non-Bnd Workspace projects and should not be configured on such projects.

You can add the Bnd nature to non-Bnd Workspace projects but you should not configure the Bnd Builder for non-Bnd Workspace projects.

Thanks, this clears things for me!