-
Notifications
You must be signed in to change notification settings - Fork 154
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
Requiring only Java 17 and 21 doesn't make sense #2504
Comments
Thanks for the issue and your thoughts!
Agree! But it's not what we're doing here and you're know that. I thought about that while implementing this. So, why I left this like that?
Flutter built on top of Android, java and gradle is not so easy to debug and Patrol adds another layer for that. As our resources to develop and maintain Patrol are limited, we prefer to suggest users with issues, to switch to java that we know that patrol is compatible with. I also have read the Jake Wharton article, you linked to issue, about testing compatibility with different java version and would like to have this in Patrol, but there are other priorities right now. |
The only incompatiblity that I think can occur is Java being too new for Gradle to run; but this is not a Patrol problem and Patrol shouldn't care about it, i.e. if you try to That said while I don't agree with your decision I understand the "why" and yeah it makes sense. Closing, thx! |
Synopsis
This doesn't make sense:
Relevant code:
patrol/packages/patrol_cli/lib/src/compatibility_checker/compatibility_checker.dart
Lines 157 to 168 in a2bc620
This condition should be simplified to
javaVersion >= 17
(or 21, when the Android Gradle Plugin drops support for 17 and starts requiring at least 21 – which will happen at some point in the future).(Admittedly, I approved the PR that introduced this code, but I didn't know it didn't make sense back then. Now I know and would like to fix it).
More info
2 great blogposts by Jake Wharton worth reading to understand there's no harm in using latest (even non-LTS) JDK:
Java is strongly backward compatible.
Many users install Java on macOS using
brew install openjdk
(see theopenjdk
formula), which defaults to the latest stable Java (not necessarily LTS. Currently latest stable Java is 23). But it's fine; non-lts releases are still very stable and simply work. There's no need to force users to use either 17 or 21, and it can create a false belief among users that e.g Java 17 or Java 21 are "stable", which is not true in fact. They're just LTS versions.The text was updated successfully, but these errors were encountered: