public class SecondaryFile extends 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)
.
callConstructor and Description |
---|
SecondaryFile(File secondaryInputFile,
boolean supportsIncrementalBuild) |
Modifier and Type | Method and Description |
---|---|
File |
getFile()
Returns the file handle for this secondary input to a Transform.
|
static SecondaryFile |
incremental(File file)
Creates a
SecondaryFile instance that, when modified, will not trigger a full,
non-incremental build. |
static SecondaryFile |
nonIncremental(File 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 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)
public static SecondaryFile incremental(@NonNull File file)
SecondaryFile
instance that, when modified, will not trigger a full,
non-incremental build.public static SecondaryFile nonIncremental(@NonNull File file)
SecondaryFile
instance that, when modified, will always trigger a full,
non-incremental build.public boolean supportsIncrementalBuild()
Transform
incrementally. If false, a change to the file returned by getFile()
will trigger
a non incremental build.@NonNull public File getFile()