Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 33ea63f

Browse files
authored
Move robolectric tests to sdk 28 (#18525)
1 parent 3daf721 commit 33ea63f

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ deps = {
502502
'packages': [
503503
{
504504
'package': 'flutter/android/embedding_bundle',
505-
'version': 'last_updated:2020-03-13T15:42:26-0700'
505+
'version': 'last_updated:2020-05-20T01:36:16-0700'
506506
}
507507
],
508508
'condition': 'download_android_deps',

shell/platform/android/embedding_bundle/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ configurations {
3737
}
3838

3939
android {
40-
compileSdkVersion 28
40+
compileSdkVersion 29
4141

4242
dependencies {
4343
embedding "androidx.annotation:annotation:1.1.0"
@@ -52,7 +52,7 @@ android {
5252
// TODO(xster): remove these android-all compile time dependencies.
5353
// Use https://github.com/robolectric/robolectric/blob/master/robolectric/src/main/java/org/robolectric/plugins/LegacyDependencyResolver.java#L24
5454
// and specify them as runtime dependencies.
55-
embeddingTesting "org.robolectric:android-all:8.1.0-robolectric-4611349"
55+
embeddingTesting "org.robolectric:android-all:9-robolectric-4913185-2"
5656
// Get robolectric shadows for SDK=16 used by PlatformPluginTest.
5757
embeddingTesting_v16 "org.robolectric:android-all:4.1.2_r1-robolectric-r1"
5858
embeddingTesting "androidx.fragment:fragment-testing:1.1.0"
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Match the value at shell/platform/android/embedding_bundle/build.gradle.
2-
sdk=29
2+
# TODO(https://github.com/flutter/flutter/issues/57655): figure out
3+
# what's wrong with sdk=29.
4+
sdk=28

shell/platform/android/test/io/flutter/embedding/android/FlutterViewTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
@Config(manifest = Config.NONE)
4444
@RunWith(RobolectricTestRunner.class)
45-
@TargetApi(29)
45+
@TargetApi(28)
4646
public class FlutterViewTest {
4747
@Mock FlutterJNI mockFlutterJni;
4848
@Mock FlutterLoader mockFlutterLoader;

shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.robolectric.annotation.Config;
3535
import org.robolectric.shadows.ShadowClipboardManager;
3636

37-
@Config(manifest = Config.NONE, sdk = 27, shadows = ShadowClipboardManager.class)
37+
@Config(manifest = Config.NONE, shadows = ShadowClipboardManager.class)
3838
@RunWith(RobolectricTestRunner.class)
3939
public class InputConnectionAdaptorTest {
4040
@Test

shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
import org.robolectric.shadows.ShadowBuild;
5353
import org.robolectric.shadows.ShadowInputMethodManager;
5454

55-
@Config(manifest = Config.NONE, shadows = TextInputPluginTest.TestImm.class, sdk = 27)
55+
@Config(manifest = Config.NONE, shadows = TextInputPluginTest.TestImm.class)
5656
@RunWith(RobolectricTestRunner.class)
5757
public class TextInputPluginTest {
5858
// Verifies the method and arguments for a captured method call.

shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121

2222
@Config(
2323
manifest = Config.NONE,
24-
shadows = {ShadowInputMethodManager.class, ShadowDisplayManager.class, ShadowDisplay.class},
25-
sdk = 27)
24+
shadows = {ShadowInputMethodManager.class, ShadowDisplayManager.class, ShadowDisplay.class})
2625
@RunWith(RobolectricTestRunner.class)
27-
@TargetApi(27)
26+
@TargetApi(28)
2827
public class SingleViewPresentationTest {
2928
@Test
3029
public void returnsOuterContextInputMethodManager() {

0 commit comments

Comments
 (0)