Unverified Commit d155bc1b authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

Revert "Upgrade Gradle and AGP versions to 7.5/7.2 and migrate examples/tests (#108197)" (#108349)

This reverts commit ca6cecf0.
parent ca6cecf0
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -10,7 +10,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -14,7 +14,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
......
......@@ -27,10 +27,10 @@ import 'android_sdk.dart';
// For more information about the latest version, check:
// https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
// https://kotlinlang.org/docs/gradle.html#plugin-and-versions
const String templateDefaultGradleVersion = '7.5';
const String templateAndroidGradlePluginVersion = '7.2.0';
const String templateDefaultGradleVersionForModule = '7.2.0';
const String templateKotlinGradlePluginVersion = '1.7.10';
const String templateDefaultGradleVersion = '7.4';
const String templateAndroidGradlePluginVersion = '7.1.2';
const String templateDefaultGradleVersionForModule = '7.1.2';
const String templateKotlinGradlePluginVersion = '1.6.10';
// These versions should match the values in flutter.gradle (FlutterExtension).
// The Flutter Gradle plugin is only applied to app projects, and modules that are built from source
......@@ -204,8 +204,8 @@ String getGradleVersionFor(String androidPluginVersion) {
if (_isWithinVersionRange(androidPluginVersion, min: '4.0.0', max: '4.1.0')) {
return '6.7';
}
if (_isWithinVersionRange(androidPluginVersion, min: '7.0', max: '7.5')) {
return '7.5';
if (_isWithinVersionRange(androidPluginVersion, min: '7.0', max: '7.4')) {
return '7.4';
}
throwToolExit('Unsupported Android Plugin version: $androidPluginVersion.');
}
......
......@@ -907,10 +907,10 @@ A problem occurred evaluating project ':app'.
'│ To fix this issue, replace the following content: │\n'
'│ /android/build.gradle: │\n'
"│ - classpath 'com.android.tools.build:gradle:<current-version>' │\n"
"│ + classpath 'com.android.tools.build:gradle:7.2.0' │\n"
"│ + classpath 'com.android.tools.build:gradle:7.1.2' │\n"
'│ /android/gradle/wrapper/gradle-wrapper.properties: │\n'
'│ - https://services.gradle.org/distributions/gradle-<current-version>-all.zip │\n'
'│ + https://services.gradle.org/distributions/gradle-7.5-all.zip │\n'
'│ + https://services.gradle.org/distributions/gradle-7.4-all.zip │\n'
'└──────────────────────────────────────────────────────────────────────────────────┘\n'
)
);
......
......@@ -357,7 +357,7 @@ void main() {
'gradle',
label: 'gradle-expected-file-not-found',
parameters: CustomDimensions.fromMap(<String, String> {
'cd37': 'androidGradlePluginVersion: 7.5, fileExtension: .aab',
'cd37': 'androidGradlePluginVersion: 7.4, fileExtension: .aab',
}),
),
));
......
......@@ -443,9 +443,9 @@ flutter:
expect(getGradleVersionFor('4.0.0'), '6.7');
expect(getGradleVersionFor('4.1.0'), '6.7');
expect(getGradleVersionFor('7.0'), '7.5');
expect(getGradleVersionFor('7.1.2'), '7.5');
expect(getGradleVersionFor('7.2'), '7.5');
expect(getGradleVersionFor('7.0'), '7.4');
expect(getGradleVersionFor('7.1.2'), '7.4');
expect(getGradleVersionFor('7.2'), '7.4');
});
testWithoutContext('throws on unsupported versions', () {
......
......@@ -73,7 +73,7 @@ void main() {
'distributionPath=wrapper/dists\n'
'zipStoreBase=GRADLE_USER_HOME\n'
'zipStorePath=wrapper/dists\n'
'distributionUrl=https\\://services.gradle.org/distributions/gradle-7.5-all.zip\n');
'distributionUrl=https\\://services.gradle.org/distributions/gradle-7.4-all.zip\n');
});
testWithoutContext('injects the wrapper when some files are missing', () {
......@@ -110,7 +110,7 @@ void main() {
'distributionPath=wrapper/dists\n'
'zipStoreBase=GRADLE_USER_HOME\n'
'zipStorePath=wrapper/dists\n'
'distributionUrl=https\\://services.gradle.org/distributions/gradle-7.5-all.zip\n');
'distributionUrl=https\\://services.gradle.org/distributions/gradle-7.4-all.zip\n');
});
testWithoutContext('injects the wrapper and the Gradle version is derivated from the AGP version', () {
......
......@@ -58,12 +58,12 @@ void main() {
final RegExp androidPluginRegExp =
RegExp(r'com\.android\.tools\.build:gradle:(\d+\.\d+\.\d+)');
// Use AGP 7.2.0
// Use AGP 4.1.0
final String newBuildGradle = buildGradle.replaceAll(
androidPluginRegExp, 'com.android.tools.build:gradle:7.2.0');
androidPluginRegExp, 'com.android.tools.build:gradle:4.1.0');
buildGradleFile.writeAsStringSync(newBuildGradle);
// Run flutter build apk using AGP 7.2.0
// Run flutter build apk using AGP 4.1.0
result = processManager.runSync(<String>[
flutterBin,
...getLocalEngineArguments(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment