Skip to content

Robolectric 4.12

Compare
Choose a tag to compare
@hoisie hoisie released this 29 Mar 23:48
· 83 commits to master since this release

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 Tests for Roborazzi integration tests by @takahirom in #8726
  • Add ability to make SafetyCenterManager throw on certain arguments. #8729
  • Bump roborazzi from 1.9.0-alpha-3 to 1.9.0-alpha-4 by @dependabot in #8727
  • Bump com.android.tools.build:gradle from 8.2.0 to 8.2.1 by @dependabot in #8728
  • Create shadow for AmbientDisplayConfiguration #8730
  • Remove dead code in ReflectionHelpers by @hoisie in #8733
  • Bump preinstrumented version to 5 by @hoisie in #8738
  • Add the "accessible" SubscriptionInfo list to ShadowSubscriptionManager #8740
  • Add a shadow class for DistanceMeasurementManager which is added in SDK 34. #8741
  • Support Activity#overrideActivityTransition introduced in API level 34 by @ajeihala in #8721
  • Add necessary android:exported="true" for receivers and Activities by @utzcoz in #8743
  • Remove unused android:debuggable from AndroidManifest.xml by @utzcoz in #8744
  • Support getRoutedDevice and associated listeners for ShadowAudioTrack #8752
  • ShadowTelephonyManager shared values are now static between instances #8753
  • Add a no-op implementation for ShadowNativeBitmap.nativeExtractGainmap #8755
  • Implement creating Activity, ContentProvider and Service using AppComponentFactory by @bacecek in #8500
  • Switch to use Adopt OpenJDK on CI by @utzcoz in #8756
  • Switch to use Linux to run Emulator testing by @utzcoz in #8757
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.23.3 to 6.24.0 by @dependabot in #8746
  • Bump actions/upload-artifact from 3 to 4 by @dependabot in #8711
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.27 to 8.13.28 by @dependabot in #8747
  • Remove unused .gitmodules by @utzcoz in #8759
  • ci: Improve Emulator testing's configuration by @utzcoz in #8745
  • Try to improve ci stable by @utzcoz in #8760
  • Add getAllWallpaperDimAmounts to ShadowWallpaperManager #8763
  • Update signature of Paint.nGetRunCharacterAdvance for V #8766
  • Support addStorageVolume for cross context in Robolectric tests #8769
  • Invoke the embedded Robolectric Native Runtime starting in Android V #8770
  • Remove redundant unused native graphics test utils #8772
  • Enable Emulator testing with SDK34 by @utzcoz in #8627
  • Bump actions/cache from 3 to 4 by @dependabot in #8764
  • Bump maxHeapSize to 12GB for Android & Java modules by @utzcoz in #8775
  • Switch to use macos-13 for graphics tests on CI by @utzcoz in #8761
  • Remove unused looseSignature from some shadow classes by @utzcoz in #8762
  • Bump roborazzi from 1.9.0-alpha-4 to 1.9.0 by @dependabot in #8778
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.24.0 to 6.25.0 by @dependabot in #8780
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.28 to 8.13.29 by @dependabot in #8781
  • Bump gradle/gradle-build-action from 2.11.1 to 2.12.0 by @dependabot in #8782
  • Bump com.android.tools.build:gradle from 8.2.1 to 8.2.2 by @dependabot in #8779
  • Avoid static imports of Truth8.assertThat #8785
  • Avoid attempting to unpause a paused background Looper that is already quit #8787
  • ci: Swith to use macos-14 to replace self-hosted for M1 environment by @utzcoz in #8789
  • Fail on Looper control operations if called after quit(). #8791
  • Update the Robolectric Native Runtime compat library by @hoisie in #8790
  • Fix ErrorProne warning in ShadowBitmap hierarchy #8792
  • Add an explicit no-op implementation of SurfaceImage.nativeGetHardwareBuffer #8794
  • Update to gradle/actions/setup-gradle v3 by @MGaetan89 in #8793
  • Bump gradle/wrapper-validation-action from 1 to 2 by @dependabot in #8795
  • Bump io.gitlab.arturbosch.detekt:detekt-gradle-plugin from 1.23.4 to 1.23.5 by @dependabot in #8797
  • Only preload RNR in Android V if either graphics or SQLiteMode are native #8799
  • Migrate usages of Truth8.assertThat to equivalent usages of Truth.assertThat. #8802
  • Add ShadowPaintDrawable and a helper method to get the corner radii #8803
  • Remove instrumentation tests on API 34 by @MGaetan89 in #8807
  • Cleanup Gradle's version catalog by @MGaetan89 in #8806
  • Add perf stat for RebuildFilterList #8808
  • Lazily attach a system resource config change listener #8816
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.29 to 8.13.30 by @dependabot in #8817
  • Added javadocs for Activity#overrideActivityTransition related methods. by @ajeihala in #8813
  • Stop loading the :plugins:accessibility-deprecated module from settings.gradle by @MGaetan89 in #8822
  • Add missing implementations for PackageManager.getReceiverInfo and PackageManager.getServiceInfo by @MGaetan89 in #8800
  • Remove legacy VERSION_CODES checks by @MGaetan89 in #8805
  • Improve doc for getOverriddenActivityTransition by @utzcoz in #8823
  • Add addScanResults function to ShadowBluetoothLeScanner #8825
  • Add tests to android.util.Rational by @MGaetan89 in #8818
  • Fix ShadowBluetoothGatt.setCharacteristicNotification implementation #8828
  • Fix UnrecognisedJavadocTag for Implements by @utzcoz in #8830
  • Bump Gradle to 8.6 by @utzcoz in #8831
  • Replace AndroidX Annotation to framework one for shadows/framework by @utzcoz in #8835
  • Let dependabot update AndroidX Annotation by @MGaetan89 in #8833
  • Don't prevent shadowed classes from being serialised by @MGaetan89 in #8832
  • Limit max attribute string length for ResourceHelper#parseFloatAttribute by @utzcoz in #8837
  • Make some small fixes to install-android-prebuilt.sh by @hoisie in #8514
  • Do some minor cleanup for some Robolectric sources by @hoisie in #8842
  • Remove deprecated methods in ShadowDisplay by @MGaetan89 in #8840
  • Cancel pending and in-progress runs on push by @MGaetan89 in #8844
  • Fix InlineMe warnings for ShadowDefaultRequestDirector by @utzcoz in #8846
  • Fix some errorprone warnings by @utzcoz in #8848
  • Temporarily restore ShadowDisplay.setScaledDensity by @hoisie in #8852
  • Bump roborazzi from 1.9.0 to 1.10.1 by @dependabot in #8854
  • Bump org.jetbrains.kotlinx:kotlinx-coroutines-android from 1.7.3 to 1.8.0 by @dependabot in #8855
  • Fixed warnings in Gradle files by @MGaetan89 in #8850
  • Revert "Fixed warnings in Gradle files" by @utzcoz in #8856
  • ci: Remove unused submodule for actions/checkout by @utzcoz in #8859
  • Reland "Fixed warnings in Gradle files" by @MGaetan89 in #8857
  • Limit the length of the commit body by @MGaetan89 in #8849
  • Update ShadowVirtualDeviceManager for V #8860
  • Add shadow implementation of UiModeManager#getProjectingPackages. #8861
  • Ignore long lines containing links by @MGaetan89 in #8864
  • Add apt output dir as source directly in sourcesJar task by @bacecek in #8863
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.30 to 8.13.31 by @dependabot in #8872
  • Clone AccessibilityNodeInfo with containerTitle and stateDescription #8877
  • Support shadowing memfd_create in Robolectric. #8881
  • Add support for getInstallSourceInfo to handling non-existing InstallSourceInfo in ShadowPackageManager. #8883
  • Add a high-level overview of Robolectric's architecture by @hoisie in #8880
  • Update AssetManager method signatures for Android V #8886
  • Remove duplicated dependency in integration_tests/room/build.gradle by @MGaetan89 in #8892
  • Support loading arbitrary ARSC resources from a file descriptor. #8894
  • Fix AssociationInfoBuilder for V #8895
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.31 to 8.13.32 by @dependabot in #8904
  • Bump kotlin from 1.9.22 to 1.9.23 by @dependabot in #8905
  • Fix documentation for methods in AndroidManifest by @MGaetan89 in #8908
  • Add a basic test for native Surface by @hoisie in #8898
  • Fix ShadowCompanionDeviceManager in V #8910
  • Add revokePermission() to ShadowContextHubClient. #8914
  • Remove unused properties from AndroidManifest.xml files by @MGaetan89 in #8909
  • Remove RobolectricTestRunner.getConfig(Method) by @MGaetan89 in #8915
  • Extract spotless configurations into a single SpotlessPlugin by @Devashishbasu in #8903
  • Fix commit body validation by @MGaetan89 in #8921
  • Bump roborazzi from 1.10.1 to 1.11.0 by @dependabot in #8924
  • ShadowContextImpl: Add sendBroadcast(_, _, Bundle) starting sdk 34 #8930
  • Support to retrieve requestedFormat for SurfaceView's holder by @utzcoz in #8918
  • Bump Gradle to 8.7 by @utzcoz in #8933
  • Bump com.android.tools.build:gradle from 8.2.2 to 8.3.1 by @dependabot in #8934
  • Use androidx instead of android support libraries by @ganadist in #6554
  • Bump asm from 9.6 to 9.7 by @dependabot in #8936
  • Bump io.gitlab.arturbosch.detekt:detekt-gradle-plugin from 1.23.5 to 1.23.6 by @dependabot in #8938
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.32 to 8.13.33 by @dependabot in #8937
  • Add support for registerBestMatchingNetworkCallback in ShadowConnectivityManager. #8940
  • Retrieve KEYCODE_ prefix from real android class. #8944
  • Remove ShadowContextHubClient.revokePermission public API #8945
  • Move shadowing for KeyCharacterMap to the native layer. #8946
  • Disable FontValidation lint check in testapp's downloadable font #8949
  • Fix issue with publishing preinstrumented jars by @hoisie in #8951
  • Remove BuckManifestFactory by @jselbo in #8947
  • Bump the preinstrumented jar version to 6 #8952

New Contributors

Full Changelog: robolectric-4.11.1...robolectric-4.12