class BundlePlugin extends java.lang.Object
Gradle plug-in for building Eclipse bundles.
It adds extra functionality to the existing Java plug-in to resolve dependencies and Eclipse bundles much like with PDE-based build. It makes OSGi-related variables like os, ws and arch available for the project (via project.ext) for building against platform-dependent dependencies. An example dependency on SWT:
compile "eclipse:org.eclipse.swt.${ECLIPSE_WS}.${ECLIPSE_OS}.${ECLIPSE_ARCH}:+"
A withEclipseBundle method is declared that can use the target platform's version mapping and fix
the dependency version to a concrete value. For example:
compile withDependencies("org.eclipse.swt.${ECLIPSE_WS}.${ECLIPSE_OS}.${ECLIPSE_ARCH}")
To construct the output jar the plugin loads the contents of the build.properties
file and sync it with the jar's content.
The plug-in defines a new scope called bundled. If dependency is defined with this
scope and the updateLibs task is called, the dependency (and its transitives) is (1)
copied into the lib folder (2) added to the project descriptors and (3) referenced from the
bundle manifest file.
| Type | Name and description |
|---|---|
static java.lang.String |
TASK_NAME_COPY_LIBS |
static java.lang.String |
TASK_NAME_UPDATE_LIBS |
static java.lang.String |
TASK_NAME_UPDATE_MANIFEST |
| Type | Name and description |
|---|---|
static void |
addTaskCopyLibs(org.gradle.api.Project project) |
static void |
addTaskUpdateLibs(org.gradle.api.Project project) |
static void |
addTaskUpdateManifest(org.gradle.api.Project project) |
void |
apply(org.gradle.api.Project project) |
static java.lang.String |
calculatePluginDependency(org.gradle.api.Project project, java.lang.String pluginName, java.lang.String minimumVersion = '') |
static void |
configureProject(org.gradle.api.Project project) |
static void |
defineDependency(org.eclipse.osgi.service.resolver.BundleSpecification requiredBundle, org.gradle.api.Project project) |
static java.lang.Object |
handleCustomDependency(org.gradle.api.Project project, java.lang.Object pluginName) |
static void |
loadDependenciesFromManifest(org.gradle.api.Project project) |
static void |
updateManifest(org.gradle.api.Project project) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |