Class AbstractBndrun
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
This abstract task type is the super type of the bndrun based task types.
Properties:
- bndrun - This is the bndrun file to be run. This property must be set.
- bundles - The bundles to added to a FileSetRepository for non-Bnd Workspace builds. The default is "sourceSets.main.runtimeClasspath" plus "configurations.archives.artifacts.files". This must not be used for Bnd Workspace builds.
- ignoreFailures - If true the task will not fail if the execution fails. The default is false.
- workingDirectory - This is the directory for the execution. The default for workingDirectory is temporaryDir.
- properties - Properties that are available for evaluation of the bnd instructions for non-Bnd Workspace builds. The default is the properties of the task and project objects. This must not be used for Bnd Workspace builds.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.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 TypeMethodDescriptionvoidSetup the Run object and call worker on it.org.gradle.api.file.ConfigurableFileCollectionAdd files to use when locating bundles.protected biz.aQute.resolve.BndruncreateBndrun(aQute.bnd.build.Workspace workspace, File bndrunFile) Create the RUN object.org.gradle.api.file.RegularFilePropertyThe bndrun file for the execution.org.gradle.api.file.ConfigurableFileCollectionThe bundles to be added to a FileSetRepository for non-Bnd Workspace builds.booleanWhether execution failures should be ignored.Properties that are available for evaluation of the bnd instructions for non-Bnd Workspace builds.org.gradle.api.file.DirectoryPropertyThe working directory for the execution.protected voidinferRunEE(aQute.bnd.osgi.Processor run) Set -runee from the build environment if not already set in the Processor object.protected voidinferRunRequires(aQute.bnd.osgi.Processor run) Set -runrequires from the build environment if not already set in the Processor object.booleanWhether execution failures should be ignored.voidsetBundles(Object path) Set the files to use when locating bundles.voidsetIgnoreFailures(boolean ignoreFailures) Set whether execution failures should be ignored.protected abstract voidworker(aQute.bnd.build.Project run) Execute the Project object.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, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getReasonNotToTrackState, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, 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
-
Constructor Details
-
AbstractBndrun
public AbstractBndrun()Create a Bndrun task.
-
-
Method Details
-
getBndrun
@InputFile @PathSensitive(RELATIVE) @NormalizeLineEndings public org.gradle.api.file.RegularFileProperty getBndrun()The bndrun file for the execution.- Returns:
- The bndrun file for the execution.
-
getBundles
@InputFiles @PathSensitive(RELATIVE) public org.gradle.api.file.ConfigurableFileCollection getBundles()The bundles to be added to a FileSetRepository for non-Bnd Workspace builds.This must not be used for Bnd Workspace builds.
- Returns:
- The bundles to be added to a FileSetRepository for non-Bnd Workspace builds.
-
isIgnoreFailures
@Input public boolean isIgnoreFailures()Whether execution failures should be ignored.- Returns:
trueif execution failures will not fail the task. Otherwise, an execution failure will fail the task. The default isfalse.
-
getIgnoreFailures
@Internal public boolean getIgnoreFailures()Whether execution failures should be ignored.Alias for
isIgnoreFailures().- Returns:
trueif execution failures will not fail the task. Otherwise, an execution failure will fail the task. The default isfalse.
-
setIgnoreFailures
public void setIgnoreFailures(boolean ignoreFailures) Set whether execution failures should be ignored.- Parameters:
ignoreFailures- Iftrue, then execution failures will not fail the task. Otherwise, an execution failure will fail the task. The default isfalse.
-
getWorkingDirectory
@Internal public org.gradle.api.file.DirectoryProperty getWorkingDirectory()The working directory for the execution.- Returns:
- The working directory for the execution.
-
getProperties
Properties that are available for evaluation of the bnd instructions for non-Bnd Workspace builds.This must not be used for Bnd Workspace builds.
If this property is not set, the properties of the following are available:
task- This Task object.
project- The Project object for this task.
taskproperty is not set, the properties of this Task object will automatically be available.Note: The defaults for this property use the Project object which makes the task ineligible for the Gradle configuration cache. If you want to use this task with the Gradle configuration cache, you must set this property to ensure it does not use the Project object. Of course, this then means you cannot use
${project.xxx}style expressions in the bnd instructions unless you set those values in this property.- Returns:
- Properties available for evaluation of the bnd instructions.
-
bundles
Add files to use when locating bundles.- Parameters:
paths- The arguments will be handled using ConfigurableFileCollection.from().- Returns:
- The bundles to be added to a FileSetRepository for non-Bnd Workspace builds.
-
setBundles
Set the files to use when locating bundles.The argument will be handled using ConfigurableFileCollection.from().
- Parameters:
path- The argument will be handled using ConfigurableFileCollection.from().
-
bndrunAction
Setup the Run object and call worker on it.- Throws:
Exception- If the run action has an exception.
-
createBndrun
protected biz.aQute.resolve.Bndrun createBndrun(aQute.bnd.build.Workspace workspace, File bndrunFile) throws Exception Create the RUN object.- Parameters:
workspace- The workspace for the RUN.bndrunFile- The bndrun file for the RUN.- Returns:
- The RUN object.
- Throws:
Exception- If the create action has an exception.
-
worker
Execute the Project object.- Parameters:
run- The Project object.- Throws:
Exception- If the worker action has an exception.
-
inferRunEE
protected void inferRunEE(aQute.bnd.osgi.Processor run) Set -runee from the build environment if not already set in the Processor object.- Parameters:
run- The Processor object.
-
inferRunRequires
protected void inferRunRequires(aQute.bnd.osgi.Processor run) Set -runrequires from the build environment if not already set in the Processor object.- Parameters:
run- The Processor object.
-