Class DefaultSdkPicker

java.lang.Object
org.robolectric.plugins.DefaultSdkPicker
All Implemented Interfaces:
SdkPicker
Direct Known Subclasses:
SdkPicker

@AutoService(SdkPicker.class) @Priority(-2147483648) public class DefaultSdkPicker extends Object implements SdkPicker
Robolectric's default SdkPicker.
  • Constructor Details

    • DefaultSdkPicker

      @Inject public DefaultSdkPicker(@Nonnull SdkCollection sdkCollection, Properties systemProperties)
    • DefaultSdkPicker

      protected DefaultSdkPicker(@Nonnull SdkCollection sdkCollection, String enabledSdks)
  • Method Details

    • selectSdks

      @Nonnull public List<Sdk> selectSdks(ConfigurationStrategy.Configuration configuration, UsesSdk usesSdk)
      Enumerate the SDKs to be used for this test.
      Specified by:
      selectSdks in interface SdkPicker
      Parameters:
      configuration - a collection of configuration objects, including Config
      usesSdk - the UsesSdk for the test
      Returns:
      the list of candidate Sdks.
      Since:
      3.9
    • enumerateEnabledSdks

      @Nullable protected static Set<Sdk> enumerateEnabledSdks(SdkCollection sdkCollection, String enabledSdksString)
    • configuredSdks

      protected Set<Sdk> configuredSdks(Config config, UsesSdk usesSdk)
    • decodeSdk

      protected int decodeSdk(int value, int defaultSdk, int appMinSdk, int appTargetSdk, int appMaxSdk)
    • sdkRange

      @Nonnull protected Set<Sdk> sdkRange(int minSdk, int maxSdk)