From 25b72bab18fccb77803cc8e2610ac3a5f557c81c Mon Sep 17 00:00:00 2001 From: Aaron Housh Date: Wed, 3 Jul 2024 13:38:11 -0700 Subject: [PATCH] Fix invalid URL suggestion for gradle incompatability (#150999) The current URL has 2 /to, but it should only be 1. However, this url redirects to https://docs.flutter.dev/release/breaking-changes/android-java-gradle-migration-guide, so I can change it to that if it's preferred just to go to the final destination - just don't know if it's a redirect for a reason i didn't create an issue as it's a doc change, but if that's a requirement I can do that --- packages/flutter_tools/lib/src/android/gradle_errors.dart | 2 +- .../test/general.shard/android/gradle_errors_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/lib/src/android/gradle_errors.dart b/packages/flutter_tools/lib/src/android/gradle_errors.dart index ed1a5f5fcb..c53487458d 100644 --- a/packages/flutter_tools/lib/src/android/gradle_errors.dart +++ b/packages/flutter_tools/lib/src/android/gradle_errors.dart @@ -592,7 +592,7 @@ final GradleHandledError incompatibleJavaAndGradleVersionsHandler = GradleHandle "${globals.logger.terminal.warningMark} Your project's Gradle version " 'is incompatible with the Java version that Flutter is using for Gradle.\n\n' 'If you recently upgraded Android Studio, consult the migration guide ' - 'at https://flutter.dev/to/to/java-gradle-incompatibility.\n\n' + 'at https://flutter.dev/to/java-gradle-incompatibility.\n\n' 'Otherwise, to fix this issue, first, check the Java version used by Flutter by ' 'running `flutter doctor --verbose`.\n\n' 'Then, update the Gradle version specified in ${gradlePropertiesFile.path} ' diff --git a/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart b/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart index f710c06676..a3775337bb 100644 --- a/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart +++ b/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart @@ -1256,7 +1256,7 @@ Could not compile build file '…/example/android/build.gradle'. // Ensure the error notes the incompatible Gradle/AGP/Java versions, links to related resources, // and a portion of the path to where to change their gradle version. expect(testLogger.statusText, contains('Gradle version is incompatible with the Java version')); - expect(testLogger.statusText, contains('flutter.dev/to/to/java-gradle-incompatibility')); + expect(testLogger.statusText, contains('flutter.dev/to/java-gradle-incompatibility')); expect(testLogger.statusText, contains('gradle-wrapper.properties')); expect(testLogger.statusText, contains('https://docs.gradle.org/current/userguide/compatibility.html#java')); }, overrides: {