com.android.ide.common.build
Class SplitOutputMatcher

java.lang.Object
  extended by com.android.ide.common.build.SplitOutputMatcher

public class SplitOutputMatcher
extends java.lang.Object

Helper class to help with installation of multi-output variants.


Constructor Summary
SplitOutputMatcher()
           
 
Method Summary
static com.android.build.SplitOutput computeBestOutput(java.util.List<? extends com.android.build.SplitOutput> outputs, int density, java.util.List<java.lang.String> abis)
          Returns which output to use based on given densities and abis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitOutputMatcher

public SplitOutputMatcher()
Method Detail

computeBestOutput

@Nullable
public static com.android.build.SplitOutput computeBestOutput(@NonNull
                                                                       java.util.List<? extends com.android.build.SplitOutput> outputs,
                                                                       int density,
                                                                       @NonNull
                                                                       java.util.List<java.lang.String> abis)
Returns which output to use based on given densities and abis. This uses the same logic as the store, using two passes: First, find all the compatible outputs. Then take the one with the highest versionCode.

Parameters:
outputs - the outputs to choose from
density - the density
abis - a list of ABIs.
Returns:
the output to use or null if none are compatible.