public class OomphIdePlugin extends ProjectPlugin
Downloads and sets up an Eclipse IDE. Each IDE created by Goomph stores its plugins centrally in GoomphCacheLocations.bundlePool()
. This means it only takes ~1MB of extra diskspace per IDE, so that you can install many IDE’s, each with their own settings and plugins, while being very efficient with your disk and network resources.
gradlew ide
launches the IDE, after running any required setup tasks.To create an IDE for java projects:
apply plugin: 'com.diffplug.gradle.oomph.ide'
oomphIde {
repoEclipseLatest()
jdt {}
}
For an Eclipse Plugin project with a target platform:
oomphIde {
repoEclipse '4.5.2'
pde {
targetplatform {
installation 'target.maven/build'
installation 'target.p2/build/p2asmaven/p2'
}
}
}
You can also set the icon and splashscreen used to launch the IDE for your project, as well as detailed settings.
oomphIde {
icon 'images/icon.png'
splash 'images/mascot.png'
repoEclipseLatest()
jdt {}
eclipseIni {
vmargs('-Xmx2g') // IDE can have up to 2 gigs of RAM
}
workspaceProp '.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.css.swt.theme.prefs', {
it.put('themeid', 'org.eclipse.e4.ui.css.theme.e4_classic')
}
}
The Eclipse IDE has a broad ecosystem. You can use Goomph to configure any combination of pieces from this ecosystem, but this requires detailed knowledge of the update sites and installable units that these projects use.
oomphIde {
repo 'http://download.eclipse.org/buildship/updates/e45/releases/1.0'
iu 'org.eclipse.buildship'
}
It helps to know a little about the guts of the tasks.
ide
-> ideSetupWorkspace
-> ideSetupP2
ideSetupP2
installs plugins and updates their versions.
ideSetupWorkspace
imports the projects and sets user settings.
ideClean
and it will wipe the workspace.ide
runs the IDE.If the gradle project to which you applied this plugin also contains an eclipse project, it will automatically be imported into the workspace.
If you have a multiproject build, you can do the following:
oomphIde {
// adds the eclipse project from the given project
addProject(':gradle-project:path')
// adds eclipse projects from every Gradle project in the build
addAllProjects()
}
See OomphIdeExtension
for the full DSL.
Constructor and Description |
---|
OomphIdePlugin() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyOnce(Project project)
Plugin application, which is guaranteed to execute only once.
|
apply, getPlugin, treeDef
protected void applyOnce(Project project)
ProjectPlugin
Plugin application, which is guaranteed to execute only once.
applyOnce
in class ProjectPlugin