FELIX-5055: Upgrade DM to BndTools 3.0.0
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1705158 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/build.gradle b/dependencymanager/build.gradle
index db485ef..4465945 100644
--- a/dependencymanager/build.gradle
+++ b/dependencymanager/build.gradle
@@ -20,16 +20,30 @@
/*
* Master Gradle build script
*
- * Depends on bndWorkspace and bndURI properties set by settings.gradle.
+ * Depends on bndPlugin property set by settings.gradle.
+ * and bnd_* values from gradle.properties.
*/
-/* Add bnd as a script dependency */
+import aQute.bnd.build.Workspace
+import aQute.bnd.osgi.Constants
+
+/* Add bnd gradle plugin as a script dependency */
buildscript {
dependencies {
- classpath files(bndURI)
+ classpath bndPlugin
}
}
+/* Initialize the bnd workspace */
+Workspace.setDriver(Constants.BNDDRIVER_GRADLE)
+Workspace.addGestalt(Constants.GESTALT_BATCH, null)
+ext.bndWorkspace = new Workspace(rootDir, bnd_cnf)
+if (bndWorkspace == null) {
+ throw new GradleException("Unable to load workspace ${rootDir}/${bnd_cnf}")
+}
+
+ext.cnf = rootProject.project(bnd_cnf)
+
/* Configure the subprojects */
subprojects {
def bndProject = bndWorkspace.getProject(name)
@@ -37,4 +51,3 @@
plugins.apply 'biz.aQute.bnd'
}
}
-