Skip to content

Commit 348da8b

Browse files
[CP-stable]Make sure usesUnsupportedDependencyVersions property exists before checking it (#154270)
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? flutter/flutter#153668. Original PR at flutter/flutter#154121. ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples Fixes a tool crash case when building for Android. ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch) Causes a crash when building for Android in some cases. ### Workaround: Is there a workaround for this issue? Build with the `--android-skip-build-dependency-validation` flag. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? < Replace with validation steps here >
1 parent 611b8e1 commit 348da8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/flutter_tools/gradle/src/main/groovy/flutter.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class FlutterPlugin implements Plugin<Project> {
340340
"dependency_version_checker.gradle.kts")
341341
project.apply from: dependencyCheckerPluginPath
342342
} catch (Exception e) {
343-
if (!project.usesUnsupportedDependencyVersions) {
343+
if (!project.hasProperty("usesUnsupportedDependencyVersions") || !project.usesUnsupportedDependencyVersions) {
344344
// Possible bug in dependency checking code - warn and do not block build.
345345
project.logger.error("Warning: Flutter was unable to detect project Gradle, Java, " +
346346
"AGP, and KGP versions. Skipping dependency version checking. Error was: "

0 commit comments

Comments
 (0)