SecondaryFile

Added in 4.2.0
Deprecated in 7.0.0

class SecondaryFile


A secondary input file(s) for a 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. call. The collection should only contain one file.

Summary

Public constructors

SecondaryFile(
    secondaryInputFile: File!,
    supportsIncrementalBuild: Boolean
)

Public functions

File!

This function is deprecated.

use getFileCollection

FileCollection!

Returns the FileCollection handle for this secondary input to a Transform if this SecondaryFile is constructed with FileCollection.

FileCollection!

Returns the FileCollection handle for this secondary input to a Transform

java-static SecondaryFile!
incremental(file: File!)

This function is deprecated.

Use incremental

java-static SecondaryFile!

Creates a SecondaryFile instance that, when modified, will not trigger a full, non-incremental build.

java-static SecondaryFile!

Creates a SecondaryFile instance that, when modified, will not trigger a full non-incremental build.

java-static SecondaryFile!

This function is deprecated.

Use nonIncremental

java-static SecondaryFile!

Creates a SecondaryFile instance that, when modified, will always trigger a full, non-incremental build.

java-static SecondaryFile!

Creates a SecondaryFile instance that, when modified, will always trigger a full non-incremental build.

Boolean

Returns true if this secondary input changes can be handled by the receiving Transform incrementally.

Public constructors

SecondaryFile

Added in 4.2.0
Deprecated in 7.0.0
SecondaryFile(
    secondaryInputFile: File!,
    supportsIncrementalBuild: Boolean
)
Parameters
secondaryInputFile: File!

the File this SecondaryFile will point to

supportsIncrementalBuild: Boolean

if true, changes to the file can be handled incrementally by the transform

Public functions

getFile

Added in 4.2.0
Deprecated in 4.2.0
fun getFile(): File!

Returns the file handle for this secondary input to a Transform.

Returns
File!

a file handle.

getFileCollection

Added in 4.2.0
Deprecated in 7.0.0
fun getFileCollection(): FileCollection!

Returns the FileCollection handle for this secondary input to a Transform if this SecondaryFile is constructed with FileCollection. Otherwise, null is returned.

Note this method is not part of the API of SecondaryFile.

Returns
FileCollection!

FileCollection of this SecondaryFile

getFileCollection

Added in 4.2.0
Deprecated in 7.0.0
fun getFileCollection(project: Project!): FileCollection!

Returns the FileCollection handle for this secondary input to a Transform

If this SecondaryFile is constructed with File, the supplied will be used to create a FileCollection.

Parameters
project: Project!

for creating a FileCollection when necessary.

Returns
FileCollection!

FileCollection of this SecondaryFile

incremental

Added in 4.2.0
Deprecated in 4.2.0
java-static fun incremental(file: File!): SecondaryFile!

Creates a SecondaryFile instance that, when modified, will not trigger a full, non-incremental build.

incremental

Added in 4.2.0
Deprecated in 7.0.0
java-static fun incremental(file: FileCollection!): SecondaryFile!

Creates a SecondaryFile instance that, when modified, will not trigger a full, non-incremental build.

incremental

Added in 4.2.0
Deprecated in 7.0.0
java-static fun incremental(file: Supplier<FileCollection!>!): SecondaryFile!

Creates a SecondaryFile instance that, when modified, will not trigger a full non-incremental build.

Parameters
file: Supplier<FileCollection!>!

a supplier of file collection.

nonIncremental

Added in 4.2.0
Deprecated in 4.2.0
java-static fun nonIncremental(file: File!): SecondaryFile!

Creates a SecondaryFile instance that, when modified, will always trigger a full, non-incremental build.

nonIncremental

Added in 4.2.0
Deprecated in 7.0.0
java-static fun nonIncremental(file: FileCollection!): SecondaryFile!

Creates a SecondaryFile instance that, when modified, will always trigger a full, non-incremental build.

nonIncremental

Added in 4.2.0
Deprecated in 7.0.0
java-static fun nonIncremental(file: Supplier<FileCollection!>!): SecondaryFile!

Creates a SecondaryFile instance that, when modified, will always trigger a full non-incremental build.

Parameters
file: Supplier<FileCollection!>!

a supplier of file collection.

supportsIncrementalBuild

Added in 4.2.0
Deprecated in 7.0.0
fun supportsIncrementalBuild(): Boolean

Returns true if this secondary input changes can be handled by the receiving Transform incrementally. If false, a change to the file returned by getFileCollection will trigger a non incremental build.

Returns
Boolean

true when the input file changes can be handled incrementally, false otherwise.