Enforce a policy on supported Gradle, Java, AGP, and KGP versions (#142000)
Policy per https://flutter.dev/go/android-dependency-versions.
https://github.com/flutter/flutter/issues/140913
~Still a WIP while I clean up some error handling, remove some prints, and figure out a Java test (more difficult than the others because I believe we can only install one java version per ci shard).~
~Also it looks like there are errors that I need to fix when this checking is applied to a project that uses the old way of applying AGP/KGP using the top-level `build.gradle` file (instead of the new template way of applying them in the `settings.gradle` file).~ Done, this is why [these lines exist](9af6bae6b9/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy (L72-L88)) in `flutter.groovy`. They just needed to be added
This commit is contained in:
@@ -29,6 +29,11 @@ version.
|
||||
SDK versions are updated (you should see these fail if you do not fix them
|
||||
preemptively).
|
||||
|
||||
Also, make sure to also update to the same version in the following places:
|
||||
- The version in the buildscript block in `packages/flutter_tools/gradle/src/main/groovy/flutter.groovy`.
|
||||
- The version in the buildscript block in `packages/flutter_tools/gradle/src/main/kotlin/dependency_version_checker.gradle.kts`.
|
||||
- The version in the dependencies block in `packages/flutter_tools/gradle/build.gradle.kts`.
|
||||
|
||||
#### Gradle
|
||||
When updating the Gradle version used in project templates
|
||||
(`templateDefaultGradleVersion`), make sure that:
|
||||
|
||||
@@ -370,6 +370,9 @@ class AndroidGradleBuilder implements AndroidBuilder {
|
||||
if (!buildInfo.androidGradleDaemon) {
|
||||
command.add('--no-daemon');
|
||||
}
|
||||
if (buildInfo.androidSkipBuildDependencyValidation) {
|
||||
command.add('-PskipDependencyChecks=true');
|
||||
}
|
||||
final LocalEngineInfo? localEngineInfo = _artifacts.localEngineInfo;
|
||||
if (localEngineInfo != null) {
|
||||
final Directory localEngineRepo = _getLocalEngineRepo(
|
||||
|
||||
Reference in New Issue
Block a user