Class SecondaryFile

java.lang.Object
com.android.build.api.transform.SecondaryFile

@Deprecated public class SecondaryFile extends Object
Deprecated.
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.
  • Constructor Details

    • SecondaryFile

      public SecondaryFile(@NonNull File secondaryInputFile, boolean supportsIncrementalBuild)
      Deprecated.
      Parameters:
      secondaryInputFile - the File this SecondaryFile will point to
      supportsIncrementalBuild - if true, changes to the file can be handled incrementally by the transform
      See Also:
  • Method Details

    • incremental

      @Deprecated public static SecondaryFile incremental(@NonNull File file)
      Creates a SecondaryFile instance that, when modified, will not trigger a full, non-incremental build.
    • incremental

      public static SecondaryFile incremental(@NonNull org.gradle.api.file.FileCollection file)
      Deprecated.
      Creates a SecondaryFile instance that, when modified, will not trigger a full, non-incremental build.
    • incremental

      public static SecondaryFile incremental(@NonNull Supplier<org.gradle.api.file.FileCollection> file)
      Deprecated.
      Creates a SecondaryFile instance that, when modified, will not trigger a full non-incremental build.
      Parameters:
      file - a supplier of file collection.
    • nonIncremental

      @Deprecated public static SecondaryFile nonIncremental(@NonNull File file)
      Creates a SecondaryFile instance that, when modified, will always trigger a full, non-incremental build.
    • nonIncremental

      public static SecondaryFile nonIncremental(@NonNull org.gradle.api.file.FileCollection file)
      Deprecated.
      Creates a SecondaryFile instance that, when modified, will always trigger a full, non-incremental build.
    • nonIncremental

      public static SecondaryFile nonIncremental(@NonNull Supplier<org.gradle.api.file.FileCollection> file)
      Deprecated.
      Creates a SecondaryFile instance that, when modified, will always trigger a full non-incremental build.
      Parameters:
      file - a supplier of file collection.
    • supportsIncrementalBuild

      public boolean supportsIncrementalBuild()
      Deprecated.
      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(org.gradle.api.Project) will trigger a non incremental build.
      Returns:
      true when the input file changes can be handled incrementally, false otherwise.
    • getFileCollection

      public org.gradle.api.file.FileCollection getFileCollection(@NonNull org.gradle.api.Project project)
      Deprecated.
      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.

      Parameters:
      project - for creating a FileCollection when necessary.
      Returns:
      FileCollection of this SecondaryFile
    • getFileCollection

      @Nullable public org.gradle.api.file.FileCollection getFileCollection()
      Deprecated.
      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 of this SecondaryFile
    • getFile

      @Deprecated public File getFile()
      Returns the file handle for this secondary input to a Transform.
      Returns:
      a file handle.