Skip to content

Releases: robolectric/robolectric

Robolectric 4.10 Alpha 1

16 Mar 06:44
Compare
Choose a tag to compare
Pre-release

NOTE: Robolectric 4.10-alpha-1 is an outdated preview release; please use 4.10 or later instead.

Robolectric 4.9.2

27 Dec 23:59
Compare
Choose a tag to compare

Robolectric 4.9.2 is a minor release that primarily fixes #7879, which was an issue using native SQLite with older Linux machines.

It also includes:

  • A fix for ShadowSpeechRecognizer in SDK <= 28 (0df34bf, thanks @utzcoz)
  • Some fixes for instrumenting Jacoco-instrumented classes (7534d62 and 4e6047d). Note there are still known issues with running Robolectric instrumentation on Jacoco-instrumented classes which should hopefully be fixed in 4.10.

Full Changelog: robolectric-4.9.1...robolectric-4.9.2

Robolectric 4.9.1

19 Dec 17:08
Compare
Choose a tag to compare

Robolectric 4.9.1 is a minor release that fixes several issues:

  • Fixes sdk levels in ShadowAppOpsManager (50e2cfa, thanks @paulsowden)
  • Fixes an issue loading the native runtime on concurrent threads (0b4e996)
  • Fixes some uses of LineBreaker and StaticLayout in Compose (ed2d7d3, thanks @samliu000)
  • Added proxy settings for fetching artifacts (bed3ca5, thanks @sebastienrussell)
  • Avoid referring to Android S TelephonyCallback (d43ae9a, thanks @styluo)
  • Fix data race in ShadowPausedLooper (cb231c8)
  • Add shadow for LocaleManager#getSystemLocales (24d49f4, thanks @utzcoz)
  • Use uninterruptibly acquire for ResTable's lock (a221f68, thanks @utzcoz)
  • Update androidx.test dependencies to latest stable releases (0bdf89b, thanks @utzcoz)
  • Support zip files where EOCD's offset to central dir is -1 (9b36bc6)

Full Changelog: robolectric-4.9...robolectric-4.9.1

Robolectric 4.9

30 Sep 17:15
Compare
Choose a tag to compare

Robolectric 4.9 adds support for Android T (API level 33).

This release removes shadows supportv4 module fully.

It also installs the Conscrypt as the primary Security provider. See http://robolectric.org/blog/2022/09/06/Umesh-GSoC-on-ConscryptMode/ for details.

4.9 also turns on NATIVE sqlite mode by default for Mac and Linux. Windows will continue to use the LEGACY SQLite mode.

What's Changed

  • Enable integration_tests:sparsearray tests by @utzcoz in #7006
  • Enable CI when PRs are made to the 'google' branch by @hoisie in #7164
  • Add triggerOnReadyForSpeech() to ShadowSpeechRecognizer. #7163
  • Bump gradle-versions-plugin to 0.42.0 by @utzcoz in #6970
  • Clean up tests.yml by @utzcoz in #7161
  • Block UiController#loopMainThreadUntilIdle on registered idling resources being idle. #7148
  • Return non-zero pointer from nCreateTextureLayer #7166
  • Correctly register all idling resources #7167
  • Update README.md to declare Robolectric supports SDK 32 by @utzcoz in #7169
  • Indicate windows are visible by default (flag enabled) #7179
  • Add documentation to run tests on Emulator by @utzcoz in #7162
  • Restore accidentally deleted link to building Robolectric #7183
  • Ensure getNetworkCountryIso & getSimCountryIso return lowercase only, to match the actual APIs. #7184
  • Update RoboLocationRequest equals() and toString(). #7186
  • Centralize the Injector logic to load the native runtime #7198
  • Fixed PFD testGetFd_canRead test failed on macOS. by @ZSmallX in #7202
  • Optimize CI a bit by @Goooler in #7195
  • Clean up ctesque by @utzcoz in #7145
  • Clean up ShadowDefaultRequestDirectorTest.java by @utzcoz in #7208
  • Bump Gradle to 7.4.2 by @utzcoz in #7207
  • Remove unused Exception from example in README.md by @utzcoz in #7206
  • Error prone and google format fix annotation module by @hellosagar in #7154
  • Update CI to use JDK 11.0.14 by @hoisie in #7213
  • Support Canvas#drawRect with RectF by @Akshay2131 in #7210
  • Remove maxSdk restrition for ShadowBiometricManager#canAuthenticate implementation by @utzcoz in #7211
  • Switch to run tests on Emulator with SDK 29,32 by @utzcoz in #7170
  • Support JDK 1.8 in ShadowWrangler invokespecial logic #7219
  • build: bump errorprone plugin version from 1.3.0 to 2.0.2 by @hellosagar in #7218
  • Bring integration_tests to API 32 by @utzcoz in #7217
  • Add method expectLogMessagePatternWithThrowableMatcher to ExpectedLogMessagesRule so that users can check for a Throwable, as well as a log message pattern. #7221
  • Add javadoc for DefaultShadowPicker by @hoisie in #7222
  • Add SdkSuppress to some tests in ThemeTest and MotionEventTest by @hoisie in #7227
  • Removed targetSdk from AndroidManifest.xml by @Umesh-01 in #7232
  • Add getCurrentSyncs() in ShadowContentResolver by @Akshay2131 in #7225
  • Make deep copy of mPointerProperties for NativeInput#copyFrom by @utzcoz in #7251
  • Remove empty ShadowTextPaint by @utzcoz in #7250
  • Migrate compileSdkVersion to compileSdk by @Akshay2131 in #7253
  • Ensure ShadowActivity can work with project targetSdk less than S by @utzcoz in #7254
  • Deprecate is___Intent methods of ShadowPendingIntent #7276
  • Invoke the real View.draw(Canvas) from ShadowView.draw(Canvas) #7279
  • Add looper mode assertions to ShadowChoreographer methods #7278
  • Inline ShadowBitmapFactory#decodeByteArray by @utzcoz in #7285
  • Skip to generate shadowOf for ShadowBackdropFrameRenderer by @utzcoz in #7284
  • Add voice interactions support to ShadowVoiceInteractor #7299
  • Bump guava to 31.1-jre by @utzcoz in #7288
  • Improve the friendliness of code names for Util.java by @utzcoz in #7296
  • Add shadows for createOnDeviceSpeechRecognizer and isOnDeviceRecognitionAvailable. #7303
  • Deprecated Util#intArrayToList by @utzcoz in #7307
  • Add Shadow implementation for ShadowApplicationPackageManager.getGroupOfPlatformPermission #7313
  • Add support for changing NetworkSpecifier in NetworkCapabilities by @bacecek in #7298
  • Migrate testRuntime to testRuntimeOnly by @utzcoz in #7314
  • Add several new methods to ShadowPaint by @bacecek in #7309
  • Fix non-determinism in ShadowContentResolverTest by @hoisie in #7315
  • Tweak some tests in EspressoTest by @hoisie in #7316
  • Remove deprecated ShadowPackageManager.getPackageInfoForTesting #7318
  • Add baseline test cases for successfully expecting error and warn level logs using ExpectedLogMessagesRuleTest. #7330
  • Implements methods isVoicemailNumber() and getVoicemailNumber() of ShadowTelecomManager. #7331
  • Print log when skipping test because of legacy resource mode from P by @utzcoz in #7334
  • Change the top level project name from parent to robolectric by @hellosagar in #7347
  • Remove deprecated shadows/support-v4 by @utzcoz in #7339
  • Use compat-target module to test compatibility from SDK 28 by @utzcoz in #7100
  • [utils module] [Test conversion] Scheduler test by @hellosagar in #7235
  • [utils module] [Test conversion] Pref stats collector test by @hellosagar in #7237
  • [utils module] [Test conversion] Temp Directory test by @hellosagar in #7236
  • [utils module] [Test conversion] Plugin finder test by @hellosagar in #7238
  • [utils module] [Test conversion] Service finder adapter test by @hellosagar in #7239
  • Extract auto-service version to gradle.properties by @utzcoz in #7352
  • Removed NO_REBUILD option by @Umesh-01 in #7355
  • Update ShadowView.setLayerType to call the real underlying implementation #7356
  • Support test methods that have parameters #7358
  • Use API level int for equality and hashing #7361
  • Set Bitmap default density to qualifiers value #7372
  • Replace Bouncycastle arrays with Java arrays by @akhilrm in #7364
  • Use JDK 11 instead of 11.0.14 for CI by @utzcoz in #7365
  • Prototype GMD configuration with plugin by @utzcoz in #7349
  • Migrate ARTIFACT_FORMAT to ARTIFACT_TYPE_ATTRIBUTE by @utzcoz in #7385
  • Inline me inliner warning fix by @hellosagar in #7382
  • [warning] Equals get class warning fix by @hellosagar in #7381
  • [warning] Empty catch warning fix by @hellosagar in #7379
  • [warning] Byte buffer backing array warning fix by @hellosagar in #7368
  • Fix simulating window focus on android T. #7389
    ...
Read more

Robolectric 4.9 Alpha 1

16 Sep 20:26
Compare
Choose a tag to compare
Pre-release

NOTE: Robolectric 4.9-alpha-1 is an outdated preview release; please use 4.9 or later instead.

Robolectric 4.8.2

22 Aug 22:35
Compare
Choose a tag to compare

This is a minor release that fixes a number of issues, including:

  • #7413, an issue closing SQLite databases.

  • #7479, an initialization error in CountDownTimer.

Use Robolectric 4.8.2:

testCompile "org.robolectric:robolectric:4.8.2"

Robolectric 4.8.1

03 May 19:54
Compare
Choose a tag to compare

This is a minor release that fixes #7286, a NoClassDefError that can occur. Thanks for @utzcoz for the fix (#7284).

Robolectric 4.8

28 Apr 17:37
Compare
Choose a tag to compare

Robolectric 4.8 adds support for Android S V2 (API level 32). It also contains many bug fixes and API enhancements.

What's Changed

  • Turn off Gradle's fs watching during tests by @hoisie in #6849
  • Remove unused resources.arsc file by @hoisie in #6855
  • Fix name for macOS tasks to rename and upload binary files by @utzcoz in #6856
  • Shadow Build.VERSION#MEDIA_PERFORMANCE_CLASS in #6836
  • Support overriding Icon loading executor from Icon#loadDrawableAsync. in #6828
  • Update Android code search link to the public version in #6850
  • Remove unnecessary TimePickerDialog constructor shadow in #6838
  • Remove inaccessible Google issue tracker links in #6854
  • Use Activity's member Instrumentation in ActivityController in #6860
  • Fix UnsupportedOperationException if a leaked Activity.recreate is called in #6862
  • Add ActivityController.close that transitions Activity to destroyed state in #6864
  • Fix SDK version check for onPageFinished() call. It should be available for all SDK versions instead. See https://developer.android.com/reference/android/webkit/WebViewClient#onPageFinished(android.webkit.WebView,%20java.lang.String) in #6865
  • Limit instrumentation on interfaces in #6866
  • Bump to version 3 of preinstrumented jars by @hoisie in #6867
  • Migrate ShadowAccessibilityNodeInfo to reflector in #6868
  • Add perf stat for applying styles in binary resources in #6869
  • Refine methods: getYear(), getMonthOfYear(), getDayOfMonth() and getOnDateSetListenerCallback(). in #6841
  • Add onConnectionEvent() to ShadowInCallService. in #6870
  • Fix theme native object collection in Android S in #6873
  • Use a self-hosted Mac M1 runner for the build_nativeruntime task by @hoisie in #6871
  • Use 'processResources' task instead of 'jar' task for nativeruntime by @hoisie in #6874
  • Remove unused Exception from test methods for dependency-on-stubs by @utzcoz in #6876
  • Add solution log for unhandled PNG file by @utzcoz in #6829
  • Remove instrumentedPackages workaround by @hoisie in #6875
  • Remove unused org.robolectric.annotation.Config imports by @hoisie in #6879
  • Only using AttributionSource for compile sdk 31 and above by @utzcoz in #6884
  • Clear InputMethodManager.sInstance for SDK > P in #6880
  • Adding VcnManagementService to ShadowSystemServices for VCN-related tests. in #6881
  • Check Window flags when selecting root view in LocalUiController. #6741 in #6745
  • Cleanup of AndroidManifest Activity references. in #6878
  • Fix broken GitHub CI when running tests by @hoisie in #6893
  • Fix some lint errors in Target29CompatibilityTest by @hoisie in #6891
  • Avoid re-running ICU ./configure if Makefile exists by @hoisie in #6889
  • Remove redundant SKIP_ICU_BUILD environment variable by @hoisie in #6890
  • Remove unnecessary DatePickerDialog constructor shadow in #6897
  • Add matrix computation support to ShadowRenderNode implementations in #6775
  • Add support for building Robolectric's nativeruntime with gcc/g++ in #6900
  • Switch to Ninja for building the native runtime in #6904
  • Close android.database.Cursor objects in tests in #6905
  • Fix remaining CloseGuard warnings in Robolectric tests in #6906
    1. Adds ShadowVibrator#addSupportedPrimitives to enable in #6907
  • Use real Android code for ContentProviderClient.release in #6908
  • Update platformStrError to work in Windows in #6910
  • Add setIsUniqueDeviceAttestationSupported and isUniqueDeviceAttestationSupported support to ShadowDevicePolicyManager in #6909
  • Add custom JNI_INCLUDE_DIRS for Windows only by @utzcoz in #6914
  • Use runner.arch when calculating ICU cache keys by @hoisie in #6894
  • Add test ShadowPackageManagerTest#packageInstallerAndGetPackageInfo by @utzcoz in #6898
  • fix for NPE when ShadowLegacyAssetManager is used by @kenyee in #6918
  • Remove specific clang/clang++ env for build_native_runtime.yml by @utzcoz in #6924
  • Support nativeruntime building for Windows by @utzcoz in #6801
  • Handle more values in ShadowSystemProperties.getBoolean in #6915
  • Update the windowConfiguration bounds when updating the display metrics in #6922
  • Add shadows for UwbManager and RangingSession. in #6926
  • Make two small improvements to ShadowMatrixTest in #6929
  • Remove ServiceFinder in #6931
  • Bump AGP to 7.1.0-beta05 by @utzcoz in #6927
  • Bump SDK to 31 for integration_tests if possible by @utzcoz in #6928
  • Remove explicit binary mode declaration for affected test modules by @utzcoz in #6943
  • Remove specific clang/clang++ env for tests.yml by @utzcoz in #6945
  • Creating ShadowVcnManager for vcn-related testing. in #6932
  • Add READ_PHONE_STATE permission check to ShadowTelephonyManager.getVoiceNetworkType in #6935
  • Update ShadowAppOpsManager to allow for multiple invocations of startWatching for a single listener. in #6936
  • Add shadows for ImageReader and SurfaceTexture. Invoke updates from Surface to linked clients. in #6937
  • Fix typo in #6938
  • Add CI job to build nativeruntime for Windows by @utzcoz in #6923
  • Intercept native Font states at Java level for Android S by @utzcoz in #6954
  • Add regression test for mockito spy by @utzcoz in #6942
  • Remove unused Exception from test methods for XmlResourceParserImplTest by @utzcoz in #6946
  • Merge defaultConfig for ctesque build.gradle by @utzcoz in #6949
  • Use guavaJREVersion from gradle.properties for some modules by @utzcoz in #6952
  • Use version from gradle.properties for shadows:playservices by @utzcoz in #6951
  • Call onSaveInstanceState after onStop from API P by @utzcoz in #6940
  • Add perf stats for loading plugins and loading the native runtime in #6947
  • Add two S-specific test cases for ShadowDevicePolicyManager in #6956
  • Fix class description. in #6957
  • Support NotificationManager.addAutomaticZenRule that could add AutomaticZenRule without owner,but has configurationActivity. in #6958
  • Add plumbing for source resource id getter in #6959
  • Add ShadowConnection that records the last event sent through Connection.sendConnectionEvent. in #6964
  • Bump AGP to 7.1.0-rc01 by @utzcoz in #6955
  • Remove unused exception from tests for SQLiteLibraryLoaderTest by @utzcoz in #6968
  • Clean up androidx_test by @utzcoz in https://github.com/robolectric/robole...
Read more

Robolectric 4.8 Alpha 1

21 Mar 08:39
Compare
Choose a tag to compare
Pre-release

*NOTE: Robolectric 4.8-alpha-1 is a outdated preview release; please use 4.8 or later instead.

Robolectric 4.7.3

01 Dec 08:03
Compare
Choose a tag to compare

This is a minor release that fixes #6883, a NoClassDefError that can occur if the compileSdk < 31. Thanks for @ninniuz for reporting and @utzcoz for the fix (#6884).

It also fixes a minor case of test pollution, where a single Activity could leak across tests (see 5a1f02a for details).