Make sure usesUnsupportedDependencyVersions property exists before checking it (#154121)

Make sure `usesUnsupportedDependencyVersions` property exists before checking it in the Flutter Gradle plugin.

Related to: https://github.com/flutter/flutter/issues/153668 (doesn't fix, will need to cherry pick to fix).
This commit is contained in:
Gray Mackall
2024-08-27 18:30:24 -07:00
committed by GitHub
parent 17f63272a0
commit dad93209ab

View File

@@ -340,7 +340,7 @@ class FlutterPlugin implements Plugin<Project> {
"dependency_version_checker.gradle.kts")
project.apply from: dependencyCheckerPluginPath
} catch (Exception e) {
if (!project.usesUnsupportedDependencyVersions) {
if (!project.hasProperty("usesUnsupportedDependencyVersions") || !project.usesUnsupportedDependencyVersions) {
// Possible bug in dependency checking code - warn and do not block build.
project.logger.error("Warning: Flutter was unable to detect project Gradle, Java, " +
"AGP, and KGP versions. Skipping dependency version checking. Error was: "