[flutter_tools] add more docs to cocoapods, move to globals (#67237)

Add some placeholder docs to the Cocoapods validator and Cocoapods class. Add the injected validator to globals. #47161
This commit is contained in:
Jonah Williams
2020-10-05 17:57:48 -07:00
committed by GitHub
parent 277a72e3fe
commit 2474b07768
4 changed files with 17 additions and 5 deletions

View File

@@ -26,7 +26,6 @@ import 'intellij/intellij.dart';
import 'ios/plist_parser.dart';
import 'linux/linux_doctor.dart';
import 'linux/linux_workflow.dart';
import 'macos/cocoapods_validator.dart';
import 'macos/macos_workflow.dart';
import 'macos/xcode_validator.dart';
import 'proxy_validator.dart';
@@ -86,7 +85,7 @@ class _DefaultDoctorValidatorsProvider implements DoctorValidatorsProvider {
if (androidWorkflow.appliesToHostPlatform)
GroupedValidator(<DoctorValidator>[androidValidator, androidLicenseValidator]),
if (globals.iosWorkflow.appliesToHostPlatform || macOSWorkflow.appliesToHostPlatform)
GroupedValidator(<DoctorValidator>[XcodeValidator(xcode: globals.xcode, userMessages: userMessages), cocoapodsValidator]),
GroupedValidator(<DoctorValidator>[XcodeValidator(xcode: globals.xcode, userMessages: userMessages), globals.cocoapodsValidator]),
if (webWorkflow.appliesToHostPlatform)
ChromeValidator(
chromiumLauncher: ChromiumLauncher(

View File

@@ -32,6 +32,7 @@ import 'ios/plist_parser.dart';
import 'ios/simulators.dart';
import 'ios/xcodeproj.dart';
import 'macos/cocoapods.dart';
import 'macos/cocoapods_validator.dart';
import 'macos/xcode.dart';
import 'persistent_tool_state.dart';
import 'project.dart';
@@ -60,6 +61,8 @@ FlutterProjectFactory get projectFactory {
);
}
CocoaPodsValidator get cocoapodsValidator => context.get<CocoaPodsValidator>();
LocalEngineLocator get localEngineLocator => context.get<LocalEngineLocator>();
/// Currently active implementation of the file system.

View File

@@ -67,6 +67,15 @@ enum CocoaPodsStatus {
brokenInstall,
}
/// Cocoapods is a depenency management solution for iOS and macOS applications.
///
/// Cocoapods is generally installed via ruby gems and interacted with via
/// the `pod` CLI command.
///
/// See also:
/// * https://cocoapods.org/ - the cocoapods website.
/// * https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices - instructions for
/// installing iOS/macOS dependencies.
class CocoaPods {
CocoaPods({
@required FileSystem fileSystem,

View File

@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import '../base/context.dart';
import '../base/user_messages.dart';
import '../doctor.dart';
import 'cocoapods.dart';
CocoaPodsValidator get cocoapodsValidator => context.get<CocoaPodsValidator>();
/// A validator that confirms cocoapods is in a valid state.
///
/// See also:
/// * [CocoaPods], for the interface to the cocoapods command line tool.
class CocoaPodsValidator extends DoctorValidator {
CocoaPodsValidator(
CocoaPods cocoaPods,