flutter/packages/flutter_tools/lib/src/base
Camille Simon 594ff98a65
[Android] Add Java/AGP/Gradle incompatibility warning to flutter create (#131444)
Adds warning to `flutter create` command that checks if detected Java version is compatible with the template AGP and template Gradle versions. If a developer is building for Android and their Java version is incompatible with either the AGP or Gradle versions that Flutter currently supports by default for new Flutter projects, then

- a warning will show noting the incompatibility and
- steps will be shown to fix the issue, the recommended option being to configure a new compatible Java version given that Flutter knows we can support the template Gradle/AGP versions and updating them manually may be risky (feedback on this approach would be greatly appreciated!)

Given that the template AGP and Gradle versions are compatible, this PR assumes that the detected Java version may only conflict with one of the template AGP or Gradle versions because:
 - the minimum Java version for a given AGP version is less than the maximum Java version compatible for the minimum Gradle version required for that AGP version (too low a Java version will fail AGP compatibility test, but not Gradle compatibility).
- the maximum Java version compatible with minimum Gradle version for a given AGP version is higher than minimum Java version required for that AGP version (too high a Java version will fail Gradle compatibility test, but not AGP compatibility test).

Fixes https://github.com/flutter/flutter/issues/130515 in the sense that `flutter create foo`; `cd foo`; `flutter run` should always be successful.
2023-09-20 16:01:04 +00:00
..
analyze_size.dart Remove unnecessary null checks in flutter_tool (#118857) 2023-01-23 21:43:08 +00:00
async_guard.dart Enable more lints (#91642) 2021-10-14 22:03:03 -07:00
bot_detector.dart
build.dart enable no_literal_bool_comparisons lint (#126647) 2023-05-16 16:14:23 +00:00
command_help.dart Support disabling animations in the CLI (#132239) 2023-08-23 03:35:22 +00:00
common.dart Remove custom unawaited, prefer dart:async version (#103212) 2022-05-07 08:49:04 -07:00
config.dart Remove "note that" in our documentation (as per style guide) (#120842) 2023-02-17 22:27:33 +00:00
context.dart Enable private field promotion for flutter_tools (#134474) 2023-09-12 20:20:04 +00:00
dds.dart Reland "Remove references to Observatory (#118577)" (#121606) 2023-02-28 11:57:04 -05:00
deferred_component.dart Remove unnecessary null checks in flutter_tool (#118857) 2023-01-23 21:43:08 +00:00
error_handling_io.dart Remove 1745 decorative breaks (#123259) 2023-03-22 21:12:22 +00:00
file_system.dart [flutter_tools] Instantiate shutdown hooks before localfilesystem (#110693) 2022-09-02 17:38:56 +00:00
fingerprint.dart Remove unnecessary null checks in flutter_tool (#118857) 2023-01-23 21:43:08 +00:00
io.dart Fix typos (#121171) 2023-02-23 19:43:21 +00:00
logger.dart Support disabling animations in the CLI (#132239) 2023-08-23 03:35:22 +00:00
multi_root_file_system.dart Enable prefer_mixin (#123159) 2023-03-21 23:12:26 +00:00
net.dart Improve network resources doctor check (#120417) 2023-02-15 00:02:09 +00:00
os.dart Revert "Replace rsync when unzipping artifacts on a Mac (#126703)" (#127430) 2023-05-24 19:21:05 +00:00
platform.dart
process.dart [flutter_tools] Run ShutdownHooks when handling signals (#134590) 2023-09-13 13:05:29 -07:00
project_migrator.dart Return void from project migrate() (#112897) 2022-10-05 20:22:56 +00:00
signals.dart [flutter_tools] Run ShutdownHooks when handling signals (#134590) 2023-09-13 13:05:29 -07:00
task_queue.dart Remove globals_null_migrated.dart, move into globals.dart (#92861) 2021-11-01 17:18:03 -07:00
template.dart
terminal.dart Support disabling animations in the CLI (#132239) 2023-08-23 03:35:22 +00:00
time.dart
user_messages.dart Improve doctor output on incomplete Visual Studio installation (#133390) 2023-08-31 14:37:46 -07:00
utils.dart Prepare for making intl toBeginningOfSentenceCase non-nullable (#127488) 2023-06-23 03:25:45 +00:00
version_range.dart [Android] Add Java/AGP/Gradle incompatibility warning to flutter create (#131444) 2023-09-20 16:01:04 +00:00
version.dart [flutter_tools] Remove Version.unknown (#124771) 2023-04-15 19:56:41 +00:00