Repository navigation
Commit b1424df
Update flutter/flutter
Update flutter/flutter `ci.yaml` to test against Java 25.
Changes explained:
- `FlutterPluginUtilsTest`: the IOException test mocked `java.io.File`
and relied on `FileInputStream(File)` calling `file.getPath()` first. In
JDK 25, the constructor calls the package-private `File.isInvalid()`
first, so the strict MockK mock threw a `MockKException` instead of the
expected `IOException`. The test now uses a real directory named
`build.gradle`. Reading a directory throws `FileNotFoundException` on
every JDK and platform.
- JDK 21 `FileInputStream(File)` calls `getPath()` first
([source](https://github.com/openjdk/jdk/blob/jdk-21-ga/src/java.base/share/classes/java/io/FileInputStream.java#L136-L146)).
JDK 25 calls `isInvalid()` first
([source](https://github.com/openjdk/jdk/blob/jdk-25-ga/src/java.base/share/classes/java/io/FileInputStream.java#L132-L136)).
- The JDK 25 Javadoc says a `FileNotFoundException` is thrown if the
file "is a directory rather than a regular file"
([source](https://github.com/openjdk/jdk/blob/jdk-25-ga/src/java.base/share/classes/java/io/FileInputStream.java#L120-L126)).
- Bump MockK `1.13.16` → `1.14.11` in the Flutter Gradle Plugin. MockK
bundles Byte Buddy for inline mocking, and Byte Buddy must support the
JDK that runs the tests (Java 25 requires Byte Buddy >= 1.17.5). MockK
1.13.16 depends on Byte Buddy 1.14.17, which rejects Java 25 class files
("Java 25 (69) is not supported by the current version of Byte Buddy").
That broke 29 FGP unit tests on JDK 25. MockK 1.14.11 depends on Byte
Buddy 1.18.2.
- Byte Buddy 1.17.5 release notes: "Update ASM to version 9.8 to support
Java 25" ([release
notes](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)).
- MockK 1.13.16 uses Byte Buddy 1.14.17
([POM](https://repo1.maven.org/maven2/io/mockk/mockk-agent-jvm/1.13.16/mockk-agent-jvm-1.13.16.pom)).
MockK 1.14.11 uses Byte Buddy 1.18.2
([POM](https://repo1.maven.org/maven2/io/mockk/mockk-agent-jvm/1.14.11/mockk-agent-jvm-1.14.11.pom)).
- Bump `mockito-core` `5.8.0` → `5.20.0` in `integration_test`. Mockito
bundles Byte Buddy, which must support the JDK running the tests.
Mockito 5.8.0 depends on Byte Buddy 1.14.10, which rejects Java 25 class
files, so `FlutterDeviceScreenshotTest` failed on JDK 25. Mockito 5.20.0
depends on Byte Buddy 1.17.7. This is the same version the engine's
Android `test_runner` uses.
- Mockito 5.8.0 uses Byte Buddy 1.14.10
([POM](https://repo1.maven.org/maven2/org/mockito/mockito-core/5.8.0/mockito-core-5.8.0.pom)).
Mockito 5.20.0 uses Byte Buddy 1.17.7
([POM](https://repo1.maven.org/maven2/org/mockito/mockito-core/5.20.0/mockito-core-5.20.0.pom)).
- Regenerated the 12 `project-integration_test.lockfile` files for the
Mockito bump. Each changes `mockito-core` 5.8.0 → 5.20.0 and
`byte-buddy` / `byte-buddy-agent` 1.14.10 → 1.17.7.
Partially Addresses flutter#193404
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant in-code documentation (doc comments with
`///`).
- [x] If this PR introduces a new feature or capability, I created and
linked a website documentation issue or PR in [flutter/website] (or
verified none is needed).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.
**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[flutter/website]: https://github.com/flutter/website
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.mdci.yaml to test against Java 25 (flutter#193468)1 parent 6b9f04b commit b1424df
15 files changed
Lines changed: 169 additions & 165 deletions
File tree
- dev
- benchmarks
- complex_layout/android
- macrobenchmarks/android
- integration_tests
- android_semantics_testing/android
- channels/android
- display_cutout_rotation/android
- flavors/android
- flutter_gallery/android
- release_smoke_test/android
- spell_check/android
- ui/android
- packages
- flutter_tools/gradle
- src/test/kotlin
- integration_test
- android
- example/android
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
| 288 | + | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
| 286 | + | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
| 286 | + | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| |||
0 commit comments