Skip to content

Releases: robolectric/robolectric

Robolectric 4.12.2

18 May 06:16
Compare
Choose a tag to compare

Robolectric 4.12.2 is a minor release that fixes several issues, primarily related to HW rendering in native graphics.

HW rendering fixes:

  • The system property robolectric.screenshot.hwrdr.native was renamed torobolectric.pixelCopyRenderMode. In order to use HW rendering with PixelCopy, you must set the robolectric.pixelCopyRenderMode=hardware system property: 7307dc2
  • Fixed an issue with rendering alpha transparency: 7307dc2
  • Fixed an issue using HW rendering on Activities that are not present in Manifests: #8982, 2510878
  • Fixed an issue with View drawing cache preventing rendering: 30dc203
  • Fixed an issue with HW rendering on Mac: 1ae1478

Other fixes:

  • Fixed shadowOf compilation issues for older SDK levels.
  • Fixed error reporting BeforeClass methods: 34bcd21

Full Changelog: robolectric-4.12.1...robolectric-4.12.2

Robolectric 4.12.1

02 Apr 18:39
Compare
Choose a tag to compare

Robolectric 4.12.1 is a minor release that addressed two issues:

  1. Fixed a NoClassDefFoundError when invoking ShadowLog APIs outside of a Robolectric environment. See #8957 for details.
  2. Reduced the amount of spurious log noise that may be generated when attempting to delete temp directories in Windows. See android/nowinandroid#1242 for details.

Full Changelog: robolectric-4.12...robolectric-4.12.1

Robolectric 4.12

29 Mar 23:48
Compare
Choose a tag to compare

Robolectric 4.12 adds support for the native runtime (native SQLite and graphics modes) on Windows x86_64. It also contains a large number of bug fixes and performance improvements.

Note Robolectric 4.12 uses an updated version of the preinstrumented jars (version i6), so if you have infrastructure that caches or customizes the location of the preinstrumented jars, they will need to be updated.

What's Changed

  • Calling AlwaysOnHotwordDetector constructor reflectively #8549
  • Bump com.squareup.okhttp3:okhttp-bom from 4.11.0 to 4.12.0 by @dependabot in #8548
  • Bump androidx.core:core from 1.10.1 to 1.12.0 by @dependabot in #8463
  • Fix warnings of AndroidSdk.groovy by @utzcoz in #8503
  • Introducing SensorEventBuilder to replace ShadowSensorManager.createSensorEvent() #8581
  • Fix LocaleManager.setApplicationLocales(LocaleList) in Android U+ #8583
  • ShadowDisplayManager: Allowing adding a display with a name. #8591
  • Bump kotlin from 1.9.10 to 1.9.20 by @dependabot in #8594
  • Bump io.gitlab.arturbosch.detekt:detekt-gradle-plugin from 1.23.1 to 1.23.3 by @dependabot in #8595
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.23 to 8.13.24 by @dependabot in #8576
  • Apply Spotless for buildSrc and build script by @utzcoz in #8603
  • Bump api changes checking compatibility version to 4.11.1 by @utzcoz in #8606
  • Bump com.android.tools.build:gradle from 8.1.2 to 8.1.3 by @dependabot in #8609
  • Bump com.ibm.icu:icu4j from 73.2 to 74.1 by @dependabot in #8611
  • Update ShadowNativeSQLiteConnection.nativeOpen to not ignore parameters #8612
  • Set the calling activity in ActivityScenario when run in Robolectric. #8613
  • Remove duplicated code in ShadowPackageManager.java by @realdadfish in #8614
  • Improve the fidelity of legacy SQLite error messages by @hoisie in #8615
  • Do not use isFileEncryptedNativeOrEmulated() on Android 14 and later by @ebiggers in #8616
  • Ignore nativeruntime-dist-compat from Dependabot by @utzcoz in #8617
  • Bump com.android.tools.build:gradle from 8.1.3 to 8.1.4 by @dependabot in #8618
  • Bump androidx-fragment from 1.2.0 to 1.6.2 by @dependabot in #8593
  • Bump org.bouncycastle:bcprov-jdk18on from 1.76 to 1.77 by @dependabot in #8619
  • Switch to use gradle/gradle-build-action@v2.9.0 by @utzcoz in #8621
  • Bump org.jetbrains:annotations from 24.0.1 to 24.1.0 by @dependabot in #8620
  • Update one GMD config from SDK 33 to 34 by @utzcoz in #8622
  • Ignore androidx annotation auto-update from Dependabot by @utzcoz in #8624
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.24 to 8.13.25 by @dependabot in #8625
  • Bump androidx.window:window from 1.1.0 to 1.2.0 by @dependabot in #8626
  • Don't use isUserKeyUnlocked() after Android 14 by @ebiggers in #8635
  • Remove JDK requirements statement in README.md by @utzcoz in #8636
  • Enable CodeQL on GitHub Actions by @utzcoz in #8607
  • Use specific version of gradle/gradle-build-action for codeql.yml by @utzcoz in #8638
  • Bump kotlin from 1.9.20 to 1.9.21 by @dependabot in #8644
  • Bump gradle/gradle-build-action from 2.9.0 to 2.10.0 by @dependabot in #8647
  • Bump actions/checkout from 3 to 4 by @dependabot in #8646
  • Add ShadowBuild support for missing supported ABI fields by @jselbo in #8640
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.25 to 8.13.26 by @dependabot in #8645
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.22.0 to 6.23.0 by @dependabot in #8642
  • Bump io.gitlab.arturbosch.detekt:detekt-gradle-plugin from 1.23.3 to 1.23.4 by @dependabot in #8643
  • Bump default minSdk to 19 of AndroidManifest by @utzcoz in #8648
  • Bump actions/setup-java from 3 to 4 by @dependabot in #8664
  • Bump com.android.tools.build:gradle from 8.1.4 to 8.2.0 by @dependabot in #8667
  • Remove unused CheckApiChangesPlugin plugin by @utzcoz in #8630
  • Extract room version to libs.version.toml by @utzcoz in #8674
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.23.0 to 6.23.3 by @dependabot in #8665
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.26 to 8.13.27 by @dependabot in #8676
  • Align the behavior of HttpsURLConnection.getDefaultHostnameVerifier in Conscrypt mode. #8677
  • Add "yMMMd", "yMMMMEEEEd", and "yMMMM" date string formats to support correct date string formats. #8678
  • Add support for testing InboxStyle notifications. #8681
  • Create NetworkSpecifierFactory to allow creation of non-public NetworkSpecifier subtypes. #8685
  • ShadowInputManager.getInputDeviceIds() will now return results that corroborate the return values of .getInputDevices(). #8686
  • Fix RecordingCanvas.nFinishRecording for Q and R by @hoisie in #8690
  • Add code comment about the purpose of ShadowNativeBitmapFactory.decodeStream #8692
  • Ensure ContentResolver.applyBatch(...) return value is valid by @AntonButov in #8669
  • Bump com.ibm.icu:icu4j from 74.1 to 74.2 by @dependabot in #8695
  • Bump gradle/gradle-build-action from 2.10.0 to 2.11.0 by @dependabot in #8698
  • Make ClassInstrumentorTest more DRY #8699
  • Ensure that RNG is loaded when SystemFonts.getAvailableFonts is called in Q/R #8703
  • Bump github/codeql-action from 2 to 3 by @dependabot in #8697
  • Update native method instrumentation to include real native variants #8702
  • Update ShadowInCallService to not use reflection to set Phone in its constructor. #8705
  • Bump actions/upload-artifact from 3 to 4 by @dependabot in #8696
  • Revert "Bump actions/upload-artifact from 3 to 4" by @utzcoz in #8707
  • Add no-op implementation for ShadowNativeFontBuilder.nGetReleaseNativeAssetFunc #8708
  • Adding service management and updates writing function for ShadowBluetoothGatt and ShadowBluetoothGattServer #8709
  • Bump gradle/gradle-build-action from 2.11.0 to 2.11.1 by @dependabot in #8710
  • Bump kotlin from 1.9.21 to 1.9.22 by @dependabot in #8712
  • Use File.separator instead of a front slash in system font dir check #8714
  • Implement ShadowBluetoothA2dp codec switch related APIs #8715
  • Add additional CTS tests for BitmapFactory.decodeFileDescriptor #8718
  • Implement ShadowBluetoothA2dp optional codec related APIs #8723
  • Remove unused Exception from tests of ShadowConnectivityManager by @utzcoz in #8724
  • Add Roborazzi Integration Tests for Robolectric by @takahirom in #8719
  • Fix the Test Results Path for graphics tests by @takahirom in #8725
  • Disable Android T...
Read more

Robolectric 4.11.1

31 Oct 18:54
Compare
Choose a tag to compare

Robolectric 4.11.1 is a minor release that addressed three issues:

  1. Fixed a NoClassDefFoundError when using PixelCopy with compileSdkVersion < 34. See #8577 for details.
  2. Fixed LocaleManager.setApplicationLocales(LocaleList locales) in Android U. See #8580 for details.
  3. Fixed AttributeSetBuilder when referencing sparse resource table entries by name. See #8578 for details.

Full Changelog: robolectric-4.11...robolectric-4.11.1

Robolectric 4.11

28 Oct 22:58
Compare
Choose a tag to compare

Robolectric 4.11 adds support for Android SDK 34 (U). It also contains many bug fixes, performance improvements, and Shadow API enhancements. Robolectric 4.11 removes support for Android SDKs 18 and below. If you need to continue testing on Android SDK levels 18 and below, continue to use Robolectric 4.10.3.

Note that running tests on SDK 34 requires JDK 17.

What's Changed

  • Future proof ShadowViewGroupTest#hasFocus_shouldReturnTrueIfAnyChildHasFocus. #8034
  • Future proof ShadowCompanionDeviceManager for AssociationInfo change. #8035
  • Let example in README.md to use 4.10-alpha-1 by @utzcoz in #8056
  • Fix some Java Lint naming errors by @hoisie in #8058
  • Prep for OpenGL Matrix impl change in SDKs > T. #8060
  • Make ShadowJobScheduler thread safe #8064
  • Update issue templates by @utzcoz in #8067
  • Don't run some gradle tasks when md file changes only by @utzcoz in #8068
  • Remove unused Exception from AndroidTesetEnvironmentTest's method signature by @utzcoz in #8069
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.16.0 to 6.17.0 by @dependabot in #8074
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.7 to 8.13.8 by @dependabot in #8075
  • Import Robolectric Native Graphics tests by @hoisie in #7997
  • Remove SDK 33 Emulator tests by @utzcoz in #8077
  • Add tests for RNG in GitHub actions by @hoisie in #8080
  • Create separate sandboxes for different graphics modes #8082
  • Fix issue where Activity#isChangingConfigurations is incorrectly false during ActivityScenario#recreate in Robo tests. #8087
  • Bump asmVersion from 9.4 to 9.5 by @dependabot in #8088
  • Bump androidx.test.ext:junit from 1.1.4 to 1.1.5 by @dependabot in #8089
  • Bump com.google.auto:auto-common from 1.1.2 to 1.2.1 by @dependabot in #8090
  • Bump org.conscrypt:conscrypt-openjdk-uber from 2.4.0 to 2.5.2 by @dependabot in #8099
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.8 to 8.13.9 by @dependabot in #8100
  • Bump org.ow2.asm:asm-tree from 9.4 to 9.5 by @dependabot in #8102
  • Add shadow getter/setter method for softApConfiguration. #8107
  • Add support for ARSC resource table compact encoding #8108
  • Fix gradle wranings for Kotlin configuration by @utzcoz in #8109
  • Fix comment for maven-dependency-resolver module by @utzcoz in #8111
  • Remove mockito-core from utils' test dependencies list by @utzcoz in #8112
  • Remove duplicated gradle plugin maven repository by @utzcoz in #8113
  • Fix AssetManagerTest on android U #8117
  • Migrate some Gradle's task definations to task.register by @utzcoz in #8114
  • Support partial AppComponentFactory in Robolectric by @utzcoz in #8004
  • Remove executable flag for some Java files by @utzcoz in #8121
  • Fix doc typo for ShadowWebview by @utzcoz in #8123
  • Update requestDismissKeyguard to turn screen on. #8125
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.17.0 to 6.18.0 by @dependabot in #8127
  • Add test for ParameterizedRobolectricTestRunner with Kotlin by @utzcoz in #8122
  • Bump androidx.core:core from 1.9.0 to 1.10.0 by @dependabot in #8126
  • Added the PendingIntent.isTargetedToPackage() shadow implementation. #8141
  • Add namespace for android-library/application projects by @utzcoz in #8144
  • Remove force for dependency statements by @utzcoz in #8145
  • Remove unused SKIP_NATIVERUNTIME_BUILD for gradle_tasks_validation by @utzcoz in #8147
  • Bump io.mockk:mockk from 1.13.4 to 1.13.5 by @dependabot in #8151
  • Bump com.ibm.icu:icu4j from 72.1 to 73.1 by @dependabot in #8152
  • Bump org.bouncycastle:bcprov-jdk18on from 1.72 to 1.73 by @dependabot in #8153
  • Bump apiCompatVersion from 4.9.2 to 4.10 by @dependabot in #8150
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.9 to 8.13.10 by @dependabot in #8154
  • Update ShadowTelephonyManager with Android 12 getCallstateForSubscription() #8161
  • Throw an error if a shadow has two methods annotated with @Resetter #8164
  • Make ShdadowVibrator compatible with SDK 28+ by @utzcoz in #8148
  • Bump com.squareup.okhttp3:okhttp-bom from 4.10.0 to 4.11.0 by @dependabot in #8167
  • Bump net.ltgt.gradle:gradle-errorprone-plugin from 3.0.1 to 3.1.0 by @dependabot in #8169
  • Add ShadowVpnManager to Robolectric. #8172
  • Add setDataEnabledForReason and isDataEnabledForReason for ShadowTelephonyManager #8177
  • Migrate useLegacy and JUnit assumeTrue/False to TruthJUnit assme by @utzcoz in #8149
  • Bump annotation to 1.3 by @utzcoz in #8182
  • Bump fragment version to 1.5.7 by @utzcoz in #8183
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.10 to 8.13.11 by @dependabot in #8185
  • Fix another edge case in Jacoco instrumentation detection #8191
  • Switch conditional logic from LooperMode.PAUSED to LooperMode.LEGACY. #8195
  • Add new method setNotification() in ShadowJobService. This new method is newly introduced in Android U. #8196
  • Add shadow implementation for UserManager#removeUserWhenPossible() #8198
  • Enable version catalogs by @ganadist in #8199
  • Bump org.jacoco:org.jacoco.agent from 0.8.8 to 0.8.10 by @dependabot in #8202
  • Enable version catalogs by @ganadist in #8200
  • Add a Builder for CellInfoLte, as well as CellSignalStrengthLte/CellIdentityLte. #8207
  • Bump error-prone from 2.18.0 to 2.19.1 by @dependabot in #8210
  • Bump androidx.core:core from 1.10.0 to 1.10.1 by @dependabot in #8211
  • Only wake non-empty messageQueue on clock updates. #8216
  • Add implementation of TelephonyManager#getEmergencyNumberList, which will return a list of emergency number, which can bet set by TelephonyManager#setEmergencyNumberList static method #8217
  • Enable publish to snapshots by @hoisie in #8212
  • Android Versions in Robolectric. #8214
  • Bring snapshot usage documentation to README.md again by @utzcoz in #8229
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.11 to 8.13.12 by @dependabot in #8230
  • Add ctesque test for reading material resources. #8233
  • Support sparse encoding in FindEntryByName. #8236
  • Add support for Build.setBoard in ShadowBuild #8237
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.18.0 to 6.19.0 by @dependabot in #8246
  • Fix shadows framework gradle warnings by @utzcoz in #8244
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.12 to 8.13.13 by @dependabot in https://github.com/robo...
Read more

Robolectric 4.11-beta-2

20 Oct 16:36
Compare
Choose a tag to compare
Pre-release

NOTE: Robolectric 4.11-beta-2 is an outdated preview release; please use 4.11 or later instead.

Robolectric 4.11-beta-1

18 Oct 21:20
Compare
Choose a tag to compare
Pre-release

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

Robolectric 4.10.3

17 May 20:31
Compare
Choose a tag to compare

Robolectric 4.10.3 is a minor release that addresses two issues:

  1. Fixes #8187, which was a performance regression that was introduced by 8780368. This performance regression only occurred if tests did not release transient HandlerThreads at the end of each test. It is still recommended to clean up any HandlerThreads to avoid leaking threads. Thanks @brettchabot for the fix (8311039).
  2. Adds additional logging to help diagnose #8205 ( f1e7b43), which is a SHA-512 mismatch when fetching android-all Jar files during runtime.

Full Changelog: robolectric-4.10.2...robolectric-4.10.3

Robolectric 4.10.2

05 May 21:35
Compare
Choose a tag to compare

Robolectric 4.10.2 is a minor release that fixes an issue related to re-instrumenting classes that have already been instrumented with Jacoco (1c22a48).

Full Changelog: robolectric-4.10.1...robolectric-4.10.2

Robolectric 4.10.1

03 May 00:00
Compare
Choose a tag to compare

Robolectric 4.10.1 is a minor release that fixes several issues:

  • Fixes issue #8163, which involve ICU extensions in SQLite (9551b04)
  • Fixes issue #8137, ShadowVibrator APIs on older SDK levels (5127cef), thanks @utzcoz
  • Fixes issue #8160, where an obscure exception would be thrown in resetters (866dacc).

Full Changelog: robolectric-4.10...robolectric-4.10.1