Migrate AGP and Gradle versions to 7.1.2/7.4 (#99723)

This commit is contained in:
Emmanuel Garcia
2022-03-30 20:30:09 -07:00
committed by GitHub
parent 6baca0db96
commit 5c6918933e
14 changed files with 214 additions and 125 deletions

View File

@@ -262,7 +262,7 @@ Future<void> main() async {
} catch (e) {
return TaskResult.failure(e.toString());
} finally {
// rmTree(tempDir);
rmTree(tempDir);
}
});
}

View File

@@ -235,7 +235,6 @@ Future<void> main() async {
await runProjectTest((FlutterProject project) async {
section('gradlew assembleLocal (plugin with custom build type)');
await project.addCustomBuildType('local', initWith: 'debug');
await project.addGlobalBuildType('local', initWith: 'debug');
section('Add plugin');
project.addPlugin('path_provider');
await project.getPackages();

View File

@@ -37,7 +37,8 @@ Future<void> runProjectTest(Future<void> Function(FlutterProject project) testFu
try {
await testFunction(project);
} finally {
rmTree(tempDir);
print('tempDir=$tempDir');
// rmTree(tempDir);
}
}
@@ -274,26 +275,6 @@ android {
''');
}
Future<void> addGlobalBuildType(String name, {required String initWith}) async {
final File buildScript = File(
path.join(androidPath, 'build.gradle'),
);
buildScript.openWrite(mode: FileMode.append).write('''
subprojects {
afterEvaluate {
android {
buildTypes {
$name {
initWith $initWith
}
}
}
}
}
''');
}
/// Adds a plugin to the pubspec.
/// In pubspec, each dependency is expressed as key, value pair joined by a colon `:`.
/// such as `plugin_a`:`^0.0.1` or `plugin_a`:`\npath: /some/path`.