[flutter_tools] no-op maven artifacts if Android SDK is absent (#73957)
This commit is contained in:
@@ -1136,6 +1136,8 @@ class AndroidGenSnapshotArtifacts extends EngineCachedArtifact {
|
||||
}
|
||||
|
||||
/// A cached artifact containing the Maven dependencies used to build Android projects.
|
||||
///
|
||||
/// This is a no-op if the android SDK is not available.
|
||||
class AndroidMavenArtifacts extends ArtifactSet {
|
||||
AndroidMavenArtifacts(this.cache, {
|
||||
@required Platform platform,
|
||||
@@ -1152,6 +1154,9 @@ class AndroidMavenArtifacts extends ArtifactSet {
|
||||
FileSystem fileSystem,
|
||||
OperatingSystemUtils operatingSystemUtils,
|
||||
) async {
|
||||
if (globals.androidSdk == null) {
|
||||
return;
|
||||
}
|
||||
final Directory tempDir = cache.getRoot().createTempSync(
|
||||
'flutter_gradle_wrapper.',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user