1+ // ///////////////////////////
2+ // WRAP MAVEN DEPS TO OSGI //
3+ // ///////////////////////////
4+
5+ // find the paths of all actual projects
6+ def pluginPaths = rootProject. subprojects
7+ .collect { ' :' + it. name }
8+ .grep { it. startsWith(' :com.diffplug.' ) }
9+
10+ // the target platform will contain every jar
11+ // which is added to the platform config, as
12+ // well as all of its transitives, with OSGi
13+ // metadata created automatically by bnd as
14+ // required.
15+ configurations {
16+ platform
17+ // no need to add the plugins from p2
18+ all* . exclude group : ' eclipse-deps'
19+ }
20+ for (pluginPath in pluginPaths) {
21+ evaluationDependsOn(pluginPath)
22+ dependencies. add(' platform' , project(pluginPath))
23+ }
24+
125// Download from eclipse and put it into maven
226apply plugin : ' org.standardout.bnd-platform'
327platform {
@@ -13,6 +37,10 @@ configurations.collectMany { it.allDependencies }.findAll { it instanceof Projec
1337bundles. dependsOn(it. dependencyProject. path + ' :jar' )
1438}
1539
40+ // put the bundle task into the output of `gradle tasks` since Gradle 3.3 includes only tasks with a group
41+ bundles. group = ' Build'
42+ bundles. description = ' Converts maven dependencies into OSGi bundles.'
43+
1644dependencies {
1745// Gradle kicks out all but the newest, and we need both 18 and 17
1846platformaux ' com.google.guava:guava:17.0'
0 commit comments