This Gradle Plugin creates an OSGi runtime based on the project’s dependencies, which may include the project itself as well as its subprojects, and can run it with Apache Felix, Equinox or Knopflerfish.
See the osgi-run page on GitHub for details.