What’s New

Robolectric robolectric-4.15

robolectric-4.15

Robolectric 4.15

Robolectric 4.15 contains a lot of minor improvements, fidelity improvements, bug fixes, and shadow API enhancements. It also introduces the Robolectric Simulator, which makes it possible to launch an interactive preview of Android UI in a Robolectric environment.

NOTE Robolectric 4.15 does NOT support Android Baklava (SDK 36). Baklava will be supported in Robolectric 4.16.

If you encounter any issues, please file them on the GitHub issues page.

A huge thanks to @MGaetan89 and @utzcoz for all of their hard work that went into this release.

What's Changed

The following symbols have been removed in Robolectric 4.15.

Removed symbolReplacement
AndroidManifest#supportsLegacyResourcesMode()N/A
AndroidManifest#supportsBinaryResourcesMode()N/A
ConfigMergerProvider<Config>
DependencyResolver#getLocalArtifactUrls(DependencyJar)DependencyResolver#getLocalArtifactUrl(DependencyJar)
Fs#fileFromPath(String path)Fs#fromUrl(path)
Fs#newFile(File file)file.toPath() 
FsFile#getPath()Fs#externalize(this)
FsFile#join(String name)this.resolve(name)
InvokeDynamicClassInstrumentorClassInstrumentor
ManifestIdentifier(Path, Path, Path, String, List<Path>)ManifestIdentifier(String, Path, Path, Path, List<ManifestIdentifier>)
MavenManifestFactoryN/A
PackageItemData#getClassName()PackageItemData#getName()
Provider<T>javax.inject.Provider<T>
Qualifiers#addScreenWidth(String, int)Configuration#screenWidthDp
Qualifiers#addSmallestScreenWidth(String, int)Configuration#smallestScreenWidthDp
Qualifiers#getOrientation(String)Configuration#orientation
Qualifiers#getPlatformVersion(String)Build.VERSION#SDK_INT
Qualifiers#getScreenWidth(String)Configuration#screenWidthDp
Qualifiers#getSmallestScreenWidth(String)Configuration#smallestScreenWidthDp
RoboSettingsSet the specific system property directly
Scheduler#idleConstantly(boolean)Scheduler#setIdleState(IdleState)
SdkPickerDefaultSdkPicker
ShadowApplication#addWakeLock(PowerManager.WakeLock wl)ShadowPowerManager.addWakeLock(wl)
ShadowApplication#clearWakeLocks()ShadowPowerManager.clearWakeLocks()
ShadowApplication#getAppWidgetManager()Context#getSystemService(Context.APPWIDGET_SERVICE)
ShadowApplication#getBluetoothAdapter()BluetoothManager#getAdapter()
ShadowApplication#getForegroundThreadScheduler()Robolectric.getForegroundThreadScheduler()
ShadowApplication#getInstance()shadowOf(RuntimeEnvironment.getApplication())
ShadowApplication#getLatestWakeLock()ShadowPowerManager.getLatestWakeLock()
ShadowMap#convertToShadowName(String)N/A
XmlResourceParserImpl(Document, String, String, String, ResourceTable)XmlResourceParserImpl(Document, Path, String, String, ResourceTable)
List of changes
New Contributors

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.14.1...robolectric-4.15

View original

Discussion