SecondaryFile
open class SecondaryFile
| kotlin.Any | |
| ↳ | com.android.build.api.transform.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#transform(TransformInvocation). call. The collection should only contain one file.
Summary
            Public constructors | 
        |
|---|---|
            Public methods | 
        |
|---|---|
| open File! | 
            getFile()Returns the file handle for this secondary input to a Transform.  | 
        
| open FileCollection! | 
            getFileCollection(@NonNull project: Project)Returns the   | 
        
| open FileCollection? | 
            
             Returns the   | 
        
| open static SecondaryFile! | 
            incremental(@NonNull file: File)Creates a   | 
        
| open static SecondaryFile! | 
            incremental(@NonNull file: FileCollection)Creates a   | 
        
| open static SecondaryFile! | 
            incremental(@NonNull file: Supplier<FileCollection!>)Creates a   | 
        
| open static SecondaryFile! | 
            nonIncremental(@NonNull file: File)Creates a   | 
        
| open static SecondaryFile! | 
            nonIncremental(@NonNull file: FileCollection)Creates a   | 
        
| open static SecondaryFile! | 
            nonIncremental(@NonNull file: Supplier<FileCollection!>)Creates a   | 
        
| open Boolean | 
            
             Returns true if this secondary input changes can be handled by the receiving   | 
        
Public constructors
<init>
SecondaryFile(
@NonNull 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 methods
getFile
open fungetFile(): File!
Deprecated: use getFileCollection
Returns the file handle for this secondary input to a Transform.
| Return | |
|---|---|
| File!: a file handle. | 
getFileCollection
open fun getFileCollection(@NonNull 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. | 
| Return | |
|---|---|
| FileCollection!: FileCollection of this SecondaryFile | 
getFileCollection
@Nullable open 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.
| Return | |
|---|---|
| FileCollection?: FileCollection of this SecondaryFile | 
incremental
open static funincremental(@NonNull file: File): SecondaryFile!
Deprecated: Use incremental(FileCollection)
Creates a SecondaryFile instance that, when modified, will not trigger a full, non-incremental build.
incremental
open static fun incremental(@NonNull file: FileCollection): SecondaryFile!
Creates a SecondaryFile instance that, when modified, will not trigger a full, non-incremental build.
incremental
open static fun incremental(@NonNull 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
open static funnonIncremental(@NonNull file: File): SecondaryFile!
Deprecated: Use nonIncremental(FileCollection)
Creates a SecondaryFile instance that, when modified, will always trigger a full, non-incremental build.
nonIncremental
open static fun nonIncremental(@NonNull file: FileCollection): SecondaryFile!
Creates a SecondaryFile instance that, when modified, will always trigger a full, non-incremental build.
nonIncremental
open static fun nonIncremental(@NonNull 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
open 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.
| Return | |
|---|---|
| Boolean: true when the input file changes can be handled incrementally, false otherwise. |