[Re-re-land] Enforce a policy on supported Gradle, Java, AGP, and KGP versions (#143341)

This is a direct revert of (the revert of (the reland of (the policy pr))): https://github.com/flutter/flutter/pull/143132. 

The only change is:
1. to put a conditional all on one line, because the packages repository has a test that uses an old flutter project to make sure nothing regresses. The old project uses an old gradle version, and the old gradle version bundles an old groovy version, and the old groovy version has a bug where lines that start with `&&` don't always work: https://issues.apache.org/jira/browse/GROOVY-7218 (I enjoy that the revert reason ends up providing another strong justification to go forward with the policy). Also thanks to @reidbaker for pointing out this bug.
2. I also made a slight formatting change to the messages that print when out of the support bounds, which I think looks slightly better.

I tested this with on a branch that included a revert of https://github.com/flutter/flutter/pull/142008, and was able to recreate the failure and verify that it was resolved by 1).
This commit is contained in:
Gray Mackall
2024-02-13 07:44:17 -08:00
committed by GitHub
parent 634fcc7165
commit 8ba086a277
11 changed files with 593 additions and 4 deletions

View File

@@ -4,8 +4,8 @@
plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
android {