Skip to content

Commit

Permalink
Revert Robolectric to using SDK 30 for now.
Browse files Browse the repository at this point in the history
Properly moving tests over will be fixed with #4748.
  • Loading branch information
BenHenning committed Nov 19, 2022
1 parent a240602 commit 789f41f
Show file tree
Hide file tree
Showing 17 changed files with 625 additions and 703 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ load("@dagger//:workspace_defs.bzl", "DAGGER_ARTIFACTS", "DAGGER_REPOSITORIES")
# Add support for Robolectric: https://github.com/robolectric/robolectric-bazel
http_archive(
name = "robolectric",
strip_prefix = "robolectric-bazel-4.7",
urls = ["https://github.com/robolectric/robolectric-bazel/archive/4.7.tar.gz"],
strip_prefix = "robolectric-bazel-4.5",
urls = ["https://github.com/robolectric/robolectric-bazel/archive/4.5.tar.gz"],
)

load("@robolectric//bazel:robolectric.bzl", "robolectric_repositories")
Expand Down
4 changes: 2 additions & 2 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ MIGRATED_TESTS = [
manifest_values = {
"applicationId": "org.oppia.android",
"minSdkVersion": "19",
"targetSdkVersion": "31",
"targetSdkVersion": "30",
"versionCode": "0",
"versionName": "0.1-alpha",
},
Expand All @@ -951,7 +951,7 @@ MIGRATED_TESTS = [
manifest_values = {
"applicationId": "org.oppia.android",
"minSdkVersion": "19",
"targetSdkVersion": "31",
"targetSdkVersion": "30",
"versionCode": "0",
"versionName": "0.1-alpha",
},
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ dependencies {
'com.github.bumptech.glide:mocks:4.11.0',
'com.google.truth:truth:1.1.3',
'com.google.truth.extensions:truth-liteproto-extension:1.1.3',
'org.robolectric:annotations:4.7',
'org.robolectric:robolectric:4.7',
'org.robolectric:annotations:4.5',
'org.robolectric:robolectric:4.5',
'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2',
"org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version",
'org.mockito:mockito-core:2.7.22',
Expand All @@ -214,7 +214,7 @@ dependencies {
'com.google.truth.extensions:truth-liteproto-extension:1.1.3',
'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2',
'org.mockito:mockito-android:2.7.22',
'org.robolectric:annotations:4.7',
'org.robolectric:annotations:4.5',
)
// Adding the testing module directly causes duplicates of the below groups so we need to
// exclude them before adding the testing module to the androidTestImplementation dependencies
Expand Down
2 changes: 1 addition & 1 deletion app/src/test/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.app.test">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="30" />
</manifest>
2 changes: 1 addition & 1 deletion data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dependencies {
'junit:junit:4.12',
'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2',
'org.mockito:mockito-core:2.19.0',
'org.robolectric:robolectric:4.7',
'org.robolectric:robolectric:4.5',
project(":testing"),
)
// TODO(#59): Remove this once Bazel is introduced
Expand Down
2 changes: 1 addition & 1 deletion data/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# data/src/test/resources/robolectric.properties
# TODO(#1794): Remove the need for this file & use SDK 29 at the project level.
sdk=31
sdk=30
2 changes: 1 addition & 1 deletion domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ dependencies {
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2',
'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2',
'org.mockito:mockito-core:3.9.0',
'org.robolectric:robolectric:4.7',
'org.robolectric:robolectric:4.5',
project(":testing"),
)
kapt(
Expand Down
2 changes: 1 addition & 1 deletion domain/src/test/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.android.domain">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="30" />
</manifest>
2 changes: 1 addition & 1 deletion domain/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# domain/src/test/resources/robolectric.properties
# TODO(#1794): Remove the need for this file & use SDK 29 at the project level.
sdk=31
sdk=30
2 changes: 1 addition & 1 deletion instrumentation/src/javatests/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="org.oppia.android.app.instrumentation">
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="31" />
android:targetSdkVersion="30" />
<instrumentation
android:targetPackage="org.oppia.android"
android:name="androidx.test.runner.AndroidJUnitRunner" />
Expand Down
2 changes: 1 addition & 1 deletion testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ dependencies {
'com.google.truth.extensions:truth-liteproto-extension:1.1.3',
'nl.dionsegijn:konfetti:1.2.5',
'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2',
'org.robolectric:robolectric:4.7',
'org.robolectric:robolectric:4.5',
'org.jetbrains.kotlin:kotlin-reflect:$kotlin_version',
'org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version',
'org.mockito:mockito-core:2.19.0',
Expand Down
2 changes: 1 addition & 1 deletion testing/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# testing/src/test/resources/robolectric.properties
# TODO(#1794): Remove the need for this file & use SDK 29 at the project level.
sdk=31
sdk=30
Loading

0 comments on commit 789f41f

Please sign in to comment.