[flutter_tools] Deferred components build system (#76192)

This commit is contained in:
Gary Qian
2021-03-04 21:09:02 -05:00
committed by GitHub
parent faabc9ab46
commit ee41782732
33 changed files with 2008 additions and 245 deletions

View File

@@ -35,6 +35,8 @@ class FakeAndroidBuilder implements AndroidBuilder {
@required FlutterProject project,
@required AndroidBuildInfo androidBuildInfo,
@required String target,
bool validateDeferredComponents = true,
bool deferredComponentsEnabled = false,
}) async {}
}

View File

@@ -90,6 +90,15 @@ String getFlutterRoot() {
return path.normalize(path.join(toolsPath, '..', '..'));
}
/// Gets the path to the root of the Android SDK from the environment variable.
String getAndroidSdkRoot() {
const Platform platform = LocalPlatform();
if (platform.environment.containsKey('ANDROID_SDK_ROOT')) {
return platform.environment['ANDROID_SDK_ROOT'];
}
throw StateError('ANDROID_SDK_ROOT environment varible not set');
}
CommandRunner<void> createTestCommandRunner([ FlutterCommand command ]) {
final FlutterCommandRunner runner = TestFlutterCommandRunner();
if (command != null) {