- All Implemented Interfaces:
Plugin<Project>
public class EquinoxLaunchPlugin
extends ProjectPlugin
Plugin for launching an equinox runtime.
Here is a simple example:
```groovy
apply plugin: 'com.diffplug.osgi.equinoxlaunch'
equinoxLaunch {
// creates an EquinoxLaunchSetupTask named 'headlessAppSetup'
headlessAppSetup {
source.addThisProject()
source.addMaven('com.google.guava:guava:17.0')
source.addMaven('com.google.guava:guava:18.0')
// creates an EquinoxLaunchTask named 'headlessApp' which depends on 'headlessAppSetup'
launchTask 'headlessApp', {
it.args = ['-consoleLog', '-application', 'com.diffplug.rcpdemo.headlessapp', 'file', 'test']
}
}
}
```
And a more complex example:
```groovy
apply plugin: 'com.diffplug.osgi.equinoxlaunch'
equinoxLaunch {
// creates an EquinoxLaunchSetupTask named 'equinoxSetup'
equinoxSetup {
// adds the given project and all its runtime deps to the runtime
source.addProject(project(':myproject'))
// adds a specific configuration to the runtime
source.addConfiguration(configurations.runtime)
// adds a lone maven artifact, without any of its transitives
source.addMaven('com.google.guava:guava:17.0')
source.addMaven('com.google.guava:guava:18.0')
// optional argument, default is "build/"
installDir = 'build/equinoxSetup'
// creates an EquinoxLaunchTask named 'launchApp' which depends on 'equinoxSetup'
launchTask 'launchApp', {
// optional argument, default is project directory
workingDir = file('myWorkingDir')
// -consoleLog is strongly recommended for debugging
args = ['-consoleLog', '-application', 'com.myapp']
}
// creates an EquinoxLaunchTask named 'launchApp2' which depends on 'equinoxSetup'
launchTask 'launchApp2', {
// optional argument, default is project directory
workingDir = file('myWorkingDir')
// -consoleLog is strongly recommended for debugging
args = ['-consoleLog', '-application', 'com.myotherapp', 'other', 'args']
}
}
}
```