Migrate AGP and Gradle versions to 7.1.2/7.4 (#99723)
This commit is contained in:
@@ -262,7 +262,7 @@ Future<void> main() async {
|
||||
} catch (e) {
|
||||
return TaskResult.failure(e.toString());
|
||||
} finally {
|
||||
// rmTree(tempDir);
|
||||
rmTree(tempDir);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user