Class StreamMergeAlgorithms

java.lang.Object
com.android.builder.merge.StreamMergeAlgorithms

public final class StreamMergeAlgorithms extends Object
File merge algorithms.
  • Method Details

    • pickFirst

      @NonNull public static StreamMergeAlgorithm pickFirst()
      Algorithm that copies the content of the first stream.
      Returns:
      the algorithm
    • concat

      @NonNull public static StreamMergeAlgorithm concat()
      Algorithm that concatenates streams ensuring each stream ends with a UNIX newline character.
      Returns:
      the algorithm
    • acceptOnlyOne

      public static StreamMergeAlgorithm acceptOnlyOne()
      Algorithm that only accepts one input, failing with DuplicateRelativeFileException if invoked with more than one input.
      Returns:
      the algorithm
    • select

      @NonNull public static StreamMergeAlgorithm select(@NonNull Function<String,StreamMergeAlgorithm> select)
      Algorithm that selects another algorithm based on a function that is applied to the file's path.
      Parameters:
      select - the algorithm-selection function; this function will determine which algorithm to use based on the OS-independent path of the file to merge
      Returns:
      the select algorithm