diff --git a/DEPS b/DEPS index 6f62087b8d0..cec21d5bf8d 100644 --- a/DEPS +++ b/DEPS @@ -634,7 +634,7 @@ deps = { 'packages': [ { 'package': 'flutter/java/openjdk/${{platform}}', - 'version': 'version:17' + 'version': 'version:21' } ], # Always download the JDK since java is required for running the formatter. diff --git a/engine/src/flutter/shell/platform/android/test/io/flutter/embedding/engine/dart/DartExecutorTest.java b/engine/src/flutter/shell/platform/android/test/io/flutter/embedding/engine/dart/DartExecutorTest.java index bafb501770a..bac8a61a494 100644 --- a/engine/src/flutter/shell/platform/android/test/io/flutter/embedding/engine/dart/DartExecutorTest.java +++ b/engine/src/flutter/shell/platform/android/test/io/flutter/embedding/engine/dart/DartExecutorTest.java @@ -49,7 +49,7 @@ public class DartExecutorTest { assertNotNull(dartExecutor.getBinaryMessenger()); // Execute the behavior under test. - ByteBuffer fakeMessage = mock(ByteBuffer.class); + ByteBuffer fakeMessage = ByteBuffer.allocate(0); dartExecutor.getBinaryMessenger().send("fake_channel", fakeMessage); // Verify that DartExecutor sent our message to FlutterJNI. diff --git a/engine/src/flutter/shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java b/engine/src/flutter/shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java index 5b7e09d476a..7b630d34368 100644 --- a/engine/src/flutter/shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java +++ b/engine/src/flutter/shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java @@ -58,6 +58,7 @@ import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; @@ -1597,6 +1598,8 @@ public class AccessibilityBridgeTest { assertNotEquals(event.getEventType(), AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED); } + @Ignore( + "Fails on JDK 19+ due to https://github.com/flutter/flutter/issues/175623. Not an actual bug on device; test-specific only.") @Test public void itCanPredictCursorMovementsWithGranularityWordUnicode() { AccessibilityChannel mockChannel = mock(AccessibilityChannel.class); diff --git a/engine/src/flutter/shell/platform/android/test_runner/build.gradle b/engine/src/flutter/shell/platform/android/test_runner/build.gradle index e6e26e8bceb..2891c1686bf 100644 --- a/engine/src/flutter/shell/platform/android/test_runner/build.gradle +++ b/engine/src/flutter/shell/platform/android/test_runner/build.gradle @@ -72,7 +72,7 @@ android { //noinspection RiskyLibrary,PlaySdkIndexDeprecated testImplementation "com.google.android.play:core:1.8.0" testImplementation "com.ibm.icu:icu4j:75.1" - testImplementation "org.robolectric:robolectric:4.14.1" + testImplementation "org.robolectric:robolectric:4.16" testImplementation "junit:junit:4.13.2" testImplementation "androidx.test.ext:junit:1.2.1" diff --git a/engine/src/flutter/shell/platform/android/test_runner/src/main/resources/robolectric.properties b/engine/src/flutter/shell/platform/android/test_runner/src/main/resources/robolectric.properties index 7e47f6fb21e..e187ec21e7f 100644 --- a/engine/src/flutter/shell/platform/android/test_runner/src/main/resources/robolectric.properties +++ b/engine/src/flutter/shell/platform/android/test_runner/src/main/resources/robolectric.properties @@ -1,2 +1,2 @@ -sdk=35 +sdk=36 shadows=io.flutter.CustomShadowContextImpl