# Class InstallExecutable

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.nativeplatform.tasks.InstallExecutable

All Implemented Interfaces:
  `Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, Configurable<Task>`

@DisableCachingByDefault(because="Not worth caching") public abstract class InstallExecutable extends DefaultTask
Installs an executable with it's dependent libraries so it can be easily executed.

Since:
  2.2

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Field Summary

  ### Fields inherited from interface Task

  `TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InstallExecutable(org.gradle.internal.work.WorkerLeaseService workerLeaseService)`
  Injects a `WorkerLeaseService` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract RegularFileProperty`
  `getExecutableFile()`
  The executable file to install.
  `protected abstract org.gradle.internal.nativeintegration.filesystem.FileSystem`
  `getFileSystem()`
  `protected abstract FileSystemOperations`
  `getFileSystemOperations()`
  `protected @Nullable File`
  `getInputFileIfExists()`
  Workaround for when the task is given an input file that doesn't exist
  `abstract DirectoryProperty`
  `getInstallDirectory()`
  The directory to install files into.
  `abstract RegularFileProperty`
  `getInstalledExecutable()`
  The location of the installed executable file.
  `FileCollection`
  `getLibs()`
  The library files that should be installed.
  `Provider<RegularFile>`
  `getRunScriptFile()`
  Returns the script file that can be used to run the install image.
  `abstract Property<NativePlatform>`
  `getTargetPlatform()`
  The platform being linked for.
  `abstract Property<NativeToolChain>`
  `getToolChain()`
  The tool chain used for linking.
  `protected void`
  `install()`
  Install.
  `void`
  `lib(Object libs)`
  Adds a set of library files to be installed.
  `void`
  `setLibs(FileCollection libs)`
  Sets the libs.

  ### Methods inherited from class 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, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getLoggingManager, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, service, setImpliesSubProjects`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface Task

  `doNotTrackState, notCompatibleWithConfigurationCache, service`

- ## Constructor Details

  - ### InstallExecutable

    @Inject public InstallExecutable(org.gradle.internal.work.WorkerLeaseService workerLeaseService)
    Injects a `WorkerLeaseService` instance.
    Since:
      4.2

- ## Method Details

  - ### getToolChain

    @Internal public abstract Property<NativeToolChain> getToolChain()
    The tool chain used for linking.
    Since:
      4.7

  - ### getTargetPlatform

    public abstract Property<NativePlatform> getTargetPlatform()
    The platform being linked for.
    Since:
      4.7

  - ### getInstallDirectory

    @OutputDirectory public abstract DirectoryProperty getInstallDirectory()
    The directory to install files into.
    Since:
      4.1

  - ### getExecutableFile

    @Internal("Covered by inputFileIfExists") public abstract RegularFileProperty getExecutableFile()
    The executable file to install.
    Since:
      4.7

  - ### getInstalledExecutable

    @OutputFile public abstract RegularFileProperty getInstalledExecutable()
    The location of the installed executable file.
    Since:
      4.7

  - ### getInputFileIfExists

    @SkipWhenEmpty @Optional @PathSensitive(NAME_ONLY) @InputFile protected @Nullable File getInputFileIfExists()
    Workaround for when the task is given an input file that doesn't exist
    Since:
      4.3

  - ### getLibs

    @PathSensitive(RELATIVE) @InputFiles public FileCollection getLibs()
    The library files that should be installed.
    Since:
      2.2

  - ### setLibs

    public void setLibs(FileCollection libs)
    Sets the libs.
    Since:
      2.2

  - ### lib

    public void lib(Object libs)
    Adds a set of library files to be installed. The provided libs object is evaluated as per `Project.files(Object...)`.
    Since:
      2.2

  - ### getRunScriptFile

    @Internal("covered by getInstallDirectory") public Provider<RegularFile> getRunScriptFile()
    Returns the script file that can be used to run the install image.
    Since:
      4.4

  - ### getFileSystem

    @Inject protected abstract org.gradle.internal.nativeintegration.filesystem.FileSystem getFileSystem()

  - ### getFileSystemOperations

    @Inject protected abstract FileSystemOperations getFileSystemOperations()

  - ### install

    protected void install()
    Install.
    Since:
      2.2