Osgi Bundle Classpath

Hello Team,
I am migrating my Java based web application into Osgi framework.
Gradle helped me to download all dependencies which are required for Osgi bundle.

In java projects we use classpath to add downloaded jars into classpath But i have to add every dependency into bundle classpath to resolve compilation errors in Osgi bundle.

Ex:- i created com.sample.osgi bundle. It required 10 bundles from Maven repo. How can i write gradle script to download and include bundles to particular bundle-classpath instead.