bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
532 stars 305 forks source link

support ability for gradle tasks to infer `-runrequires` #4143

Closed rotty3000 closed 3 years ago

rotty3000 commented 4 years ago

The bnd-*-maven-plugins have this support and it makes things simpler by enabling the default to be something like "resolve me".

It would be great if gradle tasks supported the same.

Effectively this is programming a default of -runrequires: osgi.identity;filter:='(osgi.identity=${project.name})' when no -runrequires instruction is provided.

Any task accepting a bndrun should be interested in this.

bjhargrave commented 4 years ago

osgi.identity=${project.name} may make sense for maven, but for a Gradle project, there can be many jar tasks. Should all the jar tasks outputs be runrequired?

rotty3000 commented 4 years ago

Maven can also have many jars. The point is more than 90% of the time there is one only. And I believe that is a reasonable default and assumption.