Package com.android.builder.merge
Class StreamMergeAlgorithms
java.lang.Object
com.android.builder.merge.StreamMergeAlgorithms
File merge algorithms.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StreamMergeAlgorithmAlgorithm that only accepts one input, failing withDuplicateRelativeFileExceptionif invoked with more than one input.static StreamMergeAlgorithmconcat()Algorithm that concatenates streams ensuring each stream ends with a UNIX newline character.static StreamMergeAlgorithmAlgorithm that copies the content of the first stream.static StreamMergeAlgorithmselect(Function<String, StreamMergeAlgorithm> select) Algorithm that selects another algorithm based on a function that is applied to the file's path.
-
Method Details
-
pickFirst
Algorithm that copies the content of the first stream.- Returns:
- the algorithm
-
concat
Algorithm that concatenates streams ensuring each stream ends with a UNIX newline character.- Returns:
- the algorithm
-
acceptOnlyOne
Algorithm that only accepts one input, failing withDuplicateRelativeFileExceptionif 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
-