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>
public class PdeBuildTask extends DefaultTask
Runs PDE build to make an RCP application or a p2 repository. Your project must have defined `GOOMPH_PDE_VER`, seePdeInstallation.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 Constructor Description PdeBuildTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPluginPath(Object pluginPath)
Adds a directory from which to read.void
app(Action<EclipseApp> antModifier)
Allows for fine-grained manipulation of the pde operation.void
base(Object 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') ```void
build()
void
destination(Object buildDir)
Sets the target directory.JdkConfig
getJdkConfig()
Returns the JDK config for users to edit.Map<String,String>
getProps()
Extra properties to set in the build.void
product(Action<PdeProductBuildConfig> productConfig)
Copies the product and imgs from the given directory to the given path within the build directory.void
setConfigs(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, usesService
-
Methods 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, setImpliesSubProjects
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
-
-
-
Method Detail
-
destination
public void destination(Object buildDir)
Sets the target directory.
-
base
public void base(Object 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
public void addPluginPath(Object pluginPath)
Adds a directory from which to read.
-
setConfigs
public void setConfigs(com.diffplug.common.swt.os.SwtPlatform... platforms)
Sets the platforms which we will build for.
-
app
public void app(Action<EclipseApp> antModifier)
Allows for fine-grained manipulation of the pde operation.
-
product
public void product(Action<PdeProductBuildConfig> productConfig)
Copies the product and imgs from the given directory to the given path within the build directory.
-
-