public class SecondaryFile
extends java.lang.Object
Transform
.
A secondary input is part of the transform inputs and can be decorated to indicate if a change
to the input would trigger a non incremental Transform.transform(TransformInvocation)
.
call.
The collection should only contain one file.Constructor and Description |
---|
SecondaryFile(java.io.File secondaryInputFile,
boolean supportsIncrementalBuild) |
Modifier and Type | Method and Description |
---|---|
java.io.File |
getFile()
Deprecated.
|
FileCollection |
getFileCollection(Project project)
Returns the
FileCollection handle for this secondary input to a Transform
If this SecondaryFile is constructed with File , the supplied Project
will be used to create a FileCollection . |
static SecondaryFile |
incremental(java.io.File file)
Deprecated.
|
static SecondaryFile |
incremental(FileCollection file)
Creates a
SecondaryFile instance that, when modified, will not trigger a full,
non-incremental build. |
static SecondaryFile |
incremental(java.util.function.Supplier<FileCollection> file)
Creates a
SecondaryFile instance that, when modified, will not trigger a full
non-incremental build. |
static SecondaryFile |
nonIncremental(java.io.File file)
Deprecated.
|
static SecondaryFile |
nonIncremental(FileCollection file)
Creates a
SecondaryFile instance that, when modified, will always trigger a full,
non-incremental build. |
static SecondaryFile |
nonIncremental(java.util.function.Supplier<FileCollection> file)
Creates a
SecondaryFile instance that, when modified, will always trigger a full
non-incremental build. |
boolean |
supportsIncrementalBuild()
Returns true if this secondary input changes can be handled by the receiving
Transform
incrementally. |
public SecondaryFile(@NonNull java.io.File secondaryInputFile, boolean supportsIncrementalBuild)
secondaryInputFile
- the File
this SecondaryFile
will point tosupportsIncrementalBuild
- if true, changes to the file can be handled incrementally
by the transformincremental(File)
,
nonIncremental(File)
@Deprecated public static SecondaryFile incremental(@NonNull java.io.File file)
incremental(FileCollection)
SecondaryFile
instance that, when modified, will not trigger a full,
non-incremental build.public static SecondaryFile incremental(@NonNull FileCollection file)
SecondaryFile
instance that, when modified, will not trigger a full,
non-incremental build.public static SecondaryFile incremental(@NonNull java.util.function.Supplier<FileCollection> file)
SecondaryFile
instance that, when modified, will not trigger a full
non-incremental build.file
- a supplier of file collection.@Deprecated public static SecondaryFile nonIncremental(@NonNull java.io.File file)
nonIncremental(FileCollection)
SecondaryFile
instance that, when modified, will always trigger a full,
non-incremental build.public static SecondaryFile nonIncremental(@NonNull FileCollection file)
SecondaryFile
instance that, when modified, will always trigger a full,
non-incremental build.public static SecondaryFile nonIncremental(@NonNull java.util.function.Supplier<FileCollection> file)
SecondaryFile
instance that, when modified, will always trigger a full
non-incremental build.file
- a supplier of file collection.public boolean supportsIncrementalBuild()
Transform
incrementally. If false, a change to the file returned by getFileCollection(org.gradle.api.Project)
will trigger a non incremental build.public FileCollection getFileCollection(@NonNull Project project)
FileCollection
handle for this secondary input to a Transform
If this SecondaryFile
is constructed with File
, the supplied Project
will be used to create a FileCollection
.project
- for creating a FileCollection when necessary.@Deprecated public java.io.File getFile()
getFileCollection(org.gradle.api.Project)