use of org.robolectric.pluginapi.UsesSdk in project robolectric by robolectric.
the class DefaultSdkPicker method selectSdks.
/**
* Enumerate the SDKs to be used for this test.
*
* @param configuration a collection of configuration objects, including {@link Config}
* @param usesSdk the {@link UsesSdk} for the test
* @return the list of candidate {@link Sdk}s.
* @since 3.9
*/
@Override
@Nonnull
public List<Sdk> selectSdks(Configuration configuration, UsesSdk usesSdk) {
Config config = configuration.get(Config.class);
Set<Sdk> sdks = new TreeSet<>(configuredSdks(config, usesSdk));
if (enabledSdks != null) {
sdks = Sets.intersection(sdks, enabledSdks);
}
return Lists.newArrayList(sdks);
}