Class CopyLibraries

  • All Implemented Interfaces:
    kotlin.Comparable , org.gradle.api.Named , org.gradle.api.Task , org.gradle.api.internal.DynamicObjectAware , org.gradle.api.internal.TaskInternal , org.gradle.api.plugins.ExtensionAware , org.gradle.util.Configurable

    @CacheableTask() 
    public abstract class CopyLibraries
    extends DefaultTask
                        

    Collects all libraries (recursively through all (sub-)projects)

    • Constructor Detail

      • CopyLibraries

        CopyLibraries(ObjectFactory objectFactory, FileSystemOperations fsOps)
    • Method Detail

      • getDependencyIDFile

        @InputFile()@PathSensitive(value = PathSensitivity.RELATIVE) final RegularFileProperty getDependencyIDFile()
      • getResolvedLibraries

        @Internal() abstract MapProperty<String, File> getResolvedLibraries()

        The libraries to be copied, mapped from their target file name '''

        ${dependency.moduleGroup}_$

        {dependency.moduleName}_

        ${dependency.moduleVersion}.$

        {artifact.extension}''' to the resolved artifact file.

        The dependencies are resolved by the plugin at configuration time, so that the task neither accesses the project nor resolves a configuration during execution. The libraries are derived from the content of {@link #dependencyIDFile}, which is tracked as an input of this task.

        This property must not be an input: the dependency IDs are written by the task that produces {@link #dependencyIDFile}, so the configuration can only be resolved after that task has run. Declaring it as an input would force the resolution while the task graph is built, which fails because the list file does not exist yet.

      • execute

         final Unit execute()

        Task action copies the resolved libraries to the libraries directory.