github robolectric/robolectric robolectric-4.11
Robolectric 4.11

6 months ago

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 #8248
  • Skip Bouncy Castle RSA modulus validation by @brandonweeks in #8252
  • Bump guava-jre from 31.1-jre to 32.0.0-jre by @dependabot in #8245
  • Attempt at fixing #8242 by @alwa in #8250
  • Add GitHub workflow that performs a sanity check on commit messages by @hoisie in #8258
  • Bump auto-service from 1.0.1 to 1.1.0 by @dependabot in #8249
  • Use macos12 to run graphics test by @utzcoz in #8261
  • Revert "Intercept Cipher#getCurrentSpi to avoid running error" by @utzcoz in #8262
  • Remove unused Exception for DeviceConfigTest by @utzcoz in #8266
  • Add more Kotlin compatibility version configuration by @utzcoz in #8267
  • Set jvm target for maven-dependency-resolver compileTestKotlin by @utzcoz in #8269
  • Run graphics tests on Ubuntu and M1 by @utzcoz in #8268
  • Bump Kotlin to 1.9.0-Beta by @utzcoz in #8115
  • Bump truth from 1.1.3 to 1.1.4 by @dependabot in #8273
  • Pin the Saturation and Value parameters in ShadowColor#HSVToColor by @mlebedy in #8277
  • Added ctesque integration tests for Color class by @mlebedy in #8281
  • Bump guava-jre from 32.0.0-jre to 32.0.1-jre by @dependabot in #8292
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.13 to 8.13.14 by @dependabot in #8294
  • Bump androidx-fragment from 1.2.0 to 1.6.0 by @dependabot in #8291
  • Support setIsOpportunistic in SubscriptionInfoBuilder. #8284
  • Add permission check to getActiveSubscriptionInfo and getPhoneNumber. #8298
  • Add permission check for shadowTelecomManager placeCall, isttysupported and getLine1Number #8299
  • Bump error-prone from 2.19.1 to 2.20.0 by @dependabot in #8307
  • Bump auto-service from 1.1.0 to 1.1.1 by @dependabot in #8308
  • Bump com.ibm.icu:icu4j from 73.1 to 73.2 by @dependabot in #8309
  • Bump com.google.auto:auto-common from 1.2.1 to 1.2.2 by @dependabot in #8310
  • Control return value of HandleMmi in shadow telecomManager #8311
  • Adds the ability to set the current cloud media authority in ShadowMediaStore. #8317
  • Bump Kotlin to 1.9.0-RC by @utzcoz in #8320
  • Bump androidx.window:window from 1.0.0 to 1.1.0 by @utzcoz in #8321
  • Retrieve algorithms with BC provider name for special tests by @utzcoz in #8288
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.14 to 8.13.15 by @dependabot in #8325
  • Bump org.bouncycastle:bcprov-jdk18on from 1.73 to 1.75 by @dependabot in #8324
  • Bump truth from 1.1.4 to 1.1.5 by @dependabot in #8323
  • Add SuppressWarnings("unchecked") in ComponentController. #8327
  • Add ShadowBluetoothGatt#requestMTU. #8334
  • Add necessary --add-opens for JDK 17 by @utzcoz in #8336
  • Bump auto-value from 1.10.1 to 1.10.2 by @dependabot in #8339
  • Bump org.jetbrains.kotlinx:kotlinx-coroutines-android from 1.7.1 to 1.7.2 by @dependabot in #8340
  • Make applyRules_rtlScript work with JDK 17 by @utzcoz in #8337
  • Add new Shadow for android.hardware.biometrics.CryptoObject to avoid MethodNotFound errors by @alwa in #8259
  • Fix typo of addExtensionMimeTypeMapping by @tonionagauzzi in #8341
  • Bump Kotlin to 1.9.0 stable version by @utzcoz in #8345
  • Bump AGP to 8.0.2 by @utzcoz in #8146
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.15 to 8.13.16 by @dependabot in #8346
  • Use JDK17 for public snapshot job by @utzcoz in #8347
  • Rollback AGP 8.x + JDK17 changes by @utzcoz in #8350
  • Use Ubuntu 22.04 for GitHub Actions by @utzcoz in #8348
  • TelephonyManager.getUiccCardsInfo() should not return null. #8356
  • Add javadoc for ShadowCryptoObject#getOpId by @utzcoz in #8351
  • Add creation of VoiceInteractionSession.CommandRequest in ShadowVoiceInteractionSession. #8365
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.16 to 8.13.17 by @dependabot in #8367
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.19.0 to 6.20.0 by @dependabot in #8366
  • Allow Matrix.setValues to be called with array size >9. by @zach-klippenstein in #8371
  • Fix some javadoc errors by @utzcoz in #8375
  • Remove extra for MavenDependencyResolver javadoc by @utzcoz in #8376
  • Bump org.jetbrains.kotlinx:kotlinx-coroutines-android from 1.7.2 to 1.7.3 by @dependabot in #8378
  • Bump org.bouncycastle:bcprov-jdk18on from 1.75 to 1.76 by @dependabot in #8380
  • Bump androidx-fragment from 1.2.0 to 1.6.1 by @dependabot in #8379
  • Added new Android U methods to ShadowJobService. #8385
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.17 to 8.13.18 by @dependabot in #8393
  • Bump guava-jre from 32.0.1-jre to 32.1.2-jre by @dependabot in #8394
  • Bump error-prone from 2.20.0 to 2.21.1 by @dependabot in #8392
  • Add StatsManager Shadow #8402
  • Add support for isTtyModeSupported() in ShadowTelephonyManager. #8406
  • Update ShadowUiAutomation to support LooperMode.INSTRUMENTATION_TEST. #8408
  • Migrate task style to register for aggregateJavadocs by @utzcoz in #8377
  • Bump auto-value from 1.10.2 to 1.10.3 by @dependabot in #8416
  • Bump io.mockk:mockk from 1.13.5 to 1.13.7 by @dependabot in #8417
  • Add 'startObservingDevicePresence' and the systemApi version of 'associate' to ShadowCompanionDeviceManager. #8415
  • Use AndroidVersions for determining SDK level in annotation processor. #8421
  • Update shadows to adapt different SDK levels #8426
  • Fix a memory leak in ShadowVMRuntime by @hoisie in #8428
  • Reland "Add support to set error message for ShadowGeocoder." by @utzcoz in #8391
  • support for queryIntentActivities(Intent intent, ResolveInfoFlags flags) of Android 13 by @qq549631030 in #8409
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.18 to 8.13.19 by @dependabot in #8433
  • Fix setTransportType method of PreciseDataConnectionStateBuilder. #8441
  • Bump kotlin from 1.9.0 to 1.9.10 by @dependabot in #8444
  • Use a global cache for ApkAssets by @hoisie in #8447
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.19 to 8.13.20 by @dependabot in #8455
  • Bump com.diffplug.spotless:spotless-plugin-gradle from 6.20.0 to 6.21.0 by @dependabot in #8456
  • Add isConnected API to ShadowBluetoothDevice #8450
  • Bump actions/checkout from 3 to 4 by @dependabot in #8462
  • Bump auto-value from 1.10.3 to 1.10.4 by @dependabot in #8464
  • Add initial implementation of cleanup logic when a Sandbox is evicted #8467
  • Add perfstats counter for evicting Robolectric sandboxes #8468
  • Reland AGP 8.x + JDK17 changes again by @utzcoz in #8358
  • Bump error-prone from 2.21.1 to 2.22.0 by @dependabot in #8479
  • Double duration of awaitFinalized in ShadowThemeTest by @utzcoz in #8481
  • Auto close ActivityController for ShadowThemeTest by @utzcoz in #8482
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.20 to 8.13.21 by @dependabot in #8480
  • Only advance the looper manually if it is paused. #8485
  • Upstream some of useful logging and ShadowDateIntervalFormat update to Github #8486
  • Bump asm from 9.5 to 9.6 by @dependabot in #8490
  • Bump com.android.tools.build:gradle from 8.1.1 to 8.1.2 by @dependabot in #8489
  • Bump Spotless to 6.22.0 by @utzcoz in #8504
  • Integrate detekt for Kotlin code quality/style by @utzcoz in #8505
  • Support custom ConnectionService inside TelecomManager by @anikitin-intermedia in #8491
  • Bump guava-jre from 32.1.2-jre to 32.1.3-jre by @dependabot in #8534
  • Bump com.googlecode.libphonenumber:libphonenumber from 8.13.21 to 8.13.23 by @dependabot in #8533
  • Fix integration_tests/mockk compile error on Java 21 by @hoisie in #8540
  • Adds shadow for UserManager#isUserForeground. #8511
  • Refactor ShadowVirtualDeviceParams methods into ShadowVirtualDevice. #8513
  • Refactor ShadowCamera to use more real Android code #8519
  • Add an implementation of dup() to ShadowParcelFileDescriptor. #8526
  • Fix issue using AttributeSetBuilder with compact resource table entries #8521
  • Add OPERATOR_* values as valid barring types for BarringInfoBuilder. #8531
  • Add support for TextRunShaper in RNG by @hoisie in #8539
  • Increment targetSdk and compileSdk from 33 to 34 for integration tests. #8529
  • Bump org.jacoco:org.jacoco.agent from 0.8.10 to 0.8.11 by @dependabot in #8542
  • Make integration_tests:jacoco-offline resilient to jacoco version changes by @hoisie in #8545
  • Downgrade guava to 31.1 and stop auto updates. by @brettchabot in #8547

Full Changelog: robolectric-4.10.3...robolectric-4.11

New Contributors

Don't miss a new robolectric release

NewReleases is sending notifications on new releases.