Skip to content

[video_player] Bump min Android implementation version for better Java compatibility #7938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

vbuberen
Copy link
Contributor

This change should help people avoid compilation issues caused by Java compatibility issues in old video_player_android versions as mentioned in flutter/flutter#156111 (comment)

Bumped to 2.7.9 as this is the version which had changes for Java compatibility as mentioned in the linked comment and plugin's changelogs: https://pub.dev/packages/video_player_android/changelog#279

I understand that running flutter pub upgrade should resolve the issue, but it is not always possible to not get into dependency update hell in big projects.
The motivation to open such PR is the same as #6355 - to let people get proper fixed versions even if they don't run flutter pub upgrade for their whole project.

Resolves flutter/flutter#157691

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@stuartmorgan-g
Copy link
Contributor

I understand that running flutter pub upgrade should resolve the issue, but it is not always possible to not get into dependency update hell in big projects.

Developers updating their toolchains should be prepared to update their dependencies, including transitive dependencies. If they choose to do that manually they certainly can, but they should not expect the entire ecosystem to enforce artificial minimums on all clients (creating more opportunities for different kinds of dependency problems which can't be fixed by clients).

The motivation to open such PR is the same as #6355 - to let people get proper fixed versions even if they don't run flutter pub upgrade for their whole project.

The context of #6355 was very different: nobody who did not have the required version would be able to publish their app. That is not the case here; the situation where this version is required is one that is a choice by the developer (to use Java 21), not a requirement imposed onto the ecosystem from outside.

Closing as this goes against our standard versioning policy, and this situation does not warrant an exception.

@vbuberen
Copy link
Contributor Author

Developers updating their toolchains should be prepared to update their dependencies, including transitive dependencies. If they choose to do that manually they certainly can, but they should not expect the entire ecosystem to enforce artificial

Please check the issue I created with all the details of the problem I wanted to solve. Running flutter pub upgrade video_player doesn't make video_player_android update even though the project uses min Dart >=3.4.0 and Flutter >=3.24.1

but they should not expect the entire ecosystem to enforce artificial minimums on all clients (creating more opportunities for different kinds of dependency problems which can't be fixed by clients).

Could you share concrete example about such opportunities from this change?

@vbuberen
Copy link
Contributor Author

is a choice by the developer (to use Java 21), not a requirement imposed onto the ecosystem from outside.

It wasn't my choice as I explained in the linked issue. It is something that changed with updates to Android Studio and IntelliJ. I didn't specify Java 21 anywhere myself. So, technically, it something that was forced by the IDE.

@stuartmorgan-g
Copy link
Contributor

Running flutter pub upgrade video_player doesn't make video_player_android update even though the project uses min Dart >=3.4.0 and Flutter >=3.24.1

That's because of dart-lang/pub#3504; it's a pub behavior, and has nothing to do with this plugin specifically or its constraints. (Once the very-recently-added flag reaches stable, we'll be able to recommend that for cases like this.)

It wasn't my choice as I explained in the linked issue. It is something that changed with updates to Android Studio and IntelliJ. I didn't specify Java 21 anywhere myself. So, technically, it something that was forced by the IDE.

Updating your toolchain (including your IDE) is a choice, as is using Java from Android Studio rather than setting it to a version you control separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[video_player] The plugin needs to bump the min Android implementation version
2 participants