Package com.diffplug.gradle.pde
Class PdeBuildTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.diffplug.gradle.pde.PdeBuildTask
- All Implemented Interfaces:
Comparable<Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,Named,ExtensionAware,Task,org.gradle.util.Configurable<Task>
Runs PDE build to make an RCP application or a p2 repository.
Your project must have defined `GOOMPH_PDE_VER`, see
PdeInstallation.fromProject(org.gradle.api.Project)
for details.
```groovy
import com.diffplug.gradle.pde.*
import com.diffplug.gradle.ZipMisc
task buildP2(type: PdeBuildTask) {
// set the base platform
base(rootProject.file('target.fromp2/build/p2asmaven/p2runnable'))
// configure where the projects will come from
addPluginPath(rootProject.file('target.frommaven/build'))
// and where they will go
destination(P2_DIR)
// specify that this is a product build
product {
id 'com.diffplug.rcpdemo.product'
version rootProject.version
productPluginDir rootProject.file('com.diffplug.rcpdemo')
productFileWithinPlugin 'rcpdemo.product'
explicitVersionPolicy({
it.resolve('com.google.guava', '17.0.0', '18.0.0').with('17.0.0', '18.0.0')
})
}
// set the build properties to be appropriate for p2
props['p2.build.repo'] = 'file://' + project.file(P2_DIR).absolutePath
props['p2.gathering'] = 'true'
props['skipDirector'] = 'true'
props['runPackager'] = 'false'
props['groupConfigurations'] = 'true'
app {
it.consolelog()
it.addArgs('-debug')
}
// p2.compress doesn't work, so we'll do it manually
doLast {
def compressXml = { name ->
def xml = project.file(P2_REPO_DIR + "/${name}.xml")
def jar = project.file(P2_REPO_DIR + "/${name}.jar")
ZipMisc.zip(xml, "${name}.xml", jar)
xml.delete()
}
compressXml('artifacts')
compressXml('content')
}
}
```-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
Task.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPluginPath(Object pluginPath) Adds a directory from which to read.voidapp(Action<EclipseApp> antModifier) Allows for fine-grained manipulation of the pde operation.voidSets the directory which contains either the extracted delta pack, or the result of a p2 mirror task containing something like this: ```groovy p2.addFeature('org.eclipse.equinox.executable') p2.addFeature('org.eclipse.rcp.configuration') p2.addFeature('org.eclipse.platform') ```voidbuild()voiddestination(Object buildDir) Sets the target directory.Returns the JDK config for users to edit.getProps()Extra properties to set in the build.voidproduct(Action<PdeProductBuildConfig> productConfig) Copies the product and imgs from the given directory to the given path within the build directory.voidsetConfigs(com.diffplug.common.swt.os.SwtPlatform... platforms) Sets the platforms which we will build for.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Constructor Details
-
PdeBuildTask
public PdeBuildTask()
-
-
Method Details
-
destination
Sets the target directory. -
base
Sets the directory which contains either the extracted delta pack, or the result of a p2 mirror task containing something like this: ```groovy p2.addFeature('org.eclipse.equinox.executable') p2.addFeature('org.eclipse.rcp.configuration') p2.addFeature('org.eclipse.platform') ``` -
addPluginPath
Adds a directory from which to read. -
getJdkConfig
Returns the JDK config for users to edit. -
getProps
Extra properties to set in the build. -
setConfigs
public void setConfigs(com.diffplug.common.swt.os.SwtPlatform... platforms) Sets the platforms which we will build for. -
app
Allows for fine-grained manipulation of the pde operation. -
product
Copies the product and imgs from the given directory to the given path within the build directory. -
build
- Throws:
Exception
-