Class PdeBuildTask

  • All Implemented Interfaces:
    Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, 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`, 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') } } ```
    • Constructor Detail

      • PdeBuildTask

        public PdeBuildTask()
    • 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.
      • getJdkConfig

        @Internal
        public JdkConfig getJdkConfig()
        Returns the JDK config for users to edit.
      • 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.