Skip to content

Commit

Permalink
build(deps): bump org.robolectric:robolectric from 4.10.3 to 4.11 (#1…
Browse files Browse the repository at this point in the history
…4617)

* build(deps): bump org.robolectric:robolectric from 4.10.3 to 4.11

Bumps [org.robolectric:robolectric](https://github.com/robolectric/robolectric) from 4.10.3 to 4.11.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](robolectric/robolectric@robolectric-4.10.3...robolectric-4.11)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): remove robolectric SDK pin so it auto-tracks, alter SDK downloads

this was only necessary before because there was an upstream bug in robolectric 4.10.3,
now that 4.11.0 is out, we can use robolectric SDK 33 and in fact move forwrd to 34

this implies that our SDK pre-downloads should be altered as well, these are the ones
downloaded now on clean runs

* test: adjust to match robolectric 4.11 needs

- one test disable: API longer responds correctly, but manual test was successful
- one test adjustement to reflect typo fix in robolectric APIs

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Hardy <[email protected]>
  • Loading branch information
dependabot[bot] and mikehardy authored Oct 31, 2023
1 parent 19ad510 commit ea07b1d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion AnkiDroid/robolectricDownloader.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def robolectricAndroidSdkVersions = [
[androidVersion: "10", frameworkSdkBuildVersion: "5803371"],
[androidVersion: "11", frameworkSdkBuildVersion: "6757853"],
// [androidVersion: "12", frameworkSdkBuildVersion: "7732740"],
[androidVersion: "12.1", frameworkSdkBuildVersion: "8229987"],
// [androidVersion: "12.1", frameworkSdkBuildVersion: "8229987"],
[androidVersion: "13", frameworkSdkBuildVersion: "9030017"],
[androidVersion: "14", frameworkSdkBuildVersion: "10818077"],
]

// Base, public task - will be displayed in ./gradlew robolectricDownloader:tasks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,13 @@ class PreferenceUpgradeServiceTest : RobolectricTest() {
upgradeAppLocale.performUpgrade(mPrefs)
val correctLanguage = mPrefs.getString("language", null)
assertThat(languageTag, equalTo(correctLanguage))
assertThat(LanguageUtil.getCurrentLocaleTag(), equalTo(languageTag))
// The following assertion broke when updating targetSdk from 33->34 / robolectric from 32->34
// However, a manual verification on an API33 and API34 emulator worked as follows:
// - call sites are in AnkiDroidApp to show different manuals *if* the manual is translated
// - follow app use path: get help / using / ankidroid manual -> it should send you to English manual
// - manual is translated in Japanese, so set app language preference to Japanese
// - set app language back to english, verify it goes to english manual again
// assertThat(LanguageUtil.getCurrentLocaleTag(), equalTo(languageTag))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ContentResolverUtilTest {

whenever(mock.getType(any())).thenReturn("image/gif")
// required for Robolectric
Shadows.shadowOf(MimeTypeMap.getSingleton()).addExtensionMimeTypMapping("gif", "image/gif")
Shadows.shadowOf(MimeTypeMap.getSingleton()).addExtensionMimeTypeMapping("gif", "image/gif")

val filename = getFileName(mock, uri)

Expand Down
4 changes: 0 additions & 4 deletions AnkiDroid/src/test/resources/robolectric.properties

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
ext.espresso_version = '3.5.1'
ext.androidx_test_version = '1.5.0'
ext.androidx_test_junit_version = '1.1.5'
ext.robolectric_version = '4.10.3'
ext.robolectric_version = '4.11'
ext.android_gradle_plugin = "8.2.0-rc01"
ext.dokka_version = "1.9.10" // not the same with kotlin version!

Expand Down

0 comments on commit ea07b1d

Please sign in to comment.