mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Android] Update Java/AGP/Gradle warning compatible Java range (#135710)
Specifies that compatible Java range stated in warning when Java version is incompatible with our template AGP & Gradle versions notes an exclusive upper bound Java version. This was a bug from https://github.com/flutter/flutter/pull/131444, and I will file a CP request to stable once this lands.
The warning uses [`getJavaVersionFor`](b5c8fd11e4/packages/flutter_tools/lib/src/android/gradle_utils.dart (L606)), which returns an exclusive upper bound, which is why this fix is necessary.
This commit is contained in:
parent
640050ba80
commit
54cf286e1a
@ -968,7 +968,7 @@ String getIncompatibleJavaGradleAgpMessageHeader(
|
||||
final String incompatibleDependencyVersion = javaGradleVersionsCompatible ? 'AGP version $templateAgpVersion' : 'Gradle version $templateGradleVersion';
|
||||
final VersionRange validJavaRange = gradle.getJavaVersionFor(gradleV: templateGradleVersion, agpV: templateAgpVersion);
|
||||
// validJavaRange should have non-null verisonMin and versionMax since it based on our template AGP and Gradle versions.
|
||||
final String validJavaRangeMessage = '(minimum compatible version: ${validJavaRange.versionMin!}, maximum compatible version: ${validJavaRange.versionMax!})';
|
||||
final String validJavaRangeMessage = '(Java ${validJavaRange.versionMin!} <= compatible Java version < Java ${validJavaRange.versionMax!})';
|
||||
|
||||
return '''
|
||||
The configured version of Java detected may conflict with the $incompatibleDependency version in your new Flutter $projectType.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user