Unverified Commit 2474b077 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[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
parent 277a72e3
...@@ -26,7 +26,6 @@ import 'intellij/intellij.dart'; ...@@ -26,7 +26,6 @@ import 'intellij/intellij.dart';
import 'ios/plist_parser.dart'; import 'ios/plist_parser.dart';
import 'linux/linux_doctor.dart'; import 'linux/linux_doctor.dart';
import 'linux/linux_workflow.dart'; import 'linux/linux_workflow.dart';
import 'macos/cocoapods_validator.dart';
import 'macos/macos_workflow.dart'; import 'macos/macos_workflow.dart';
import 'macos/xcode_validator.dart'; import 'macos/xcode_validator.dart';
import 'proxy_validator.dart'; import 'proxy_validator.dart';
...@@ -86,7 +85,7 @@ class _DefaultDoctorValidatorsProvider implements DoctorValidatorsProvider { ...@@ -86,7 +85,7 @@ class _DefaultDoctorValidatorsProvider implements DoctorValidatorsProvider {
if (androidWorkflow.appliesToHostPlatform) if (androidWorkflow.appliesToHostPlatform)
GroupedValidator(<DoctorValidator>[androidValidator, androidLicenseValidator]), GroupedValidator(<DoctorValidator>[androidValidator, androidLicenseValidator]),
if (globals.iosWorkflow.appliesToHostPlatform || macOSWorkflow.appliesToHostPlatform) 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) if (webWorkflow.appliesToHostPlatform)
ChromeValidator( ChromeValidator(
chromiumLauncher: ChromiumLauncher( chromiumLauncher: ChromiumLauncher(
......
...@@ -32,6 +32,7 @@ import 'ios/plist_parser.dart'; ...@@ -32,6 +32,7 @@ import 'ios/plist_parser.dart';
import 'ios/simulators.dart'; import 'ios/simulators.dart';
import 'ios/xcodeproj.dart'; import 'ios/xcodeproj.dart';
import 'macos/cocoapods.dart'; import 'macos/cocoapods.dart';
import 'macos/cocoapods_validator.dart';
import 'macos/xcode.dart'; import 'macos/xcode.dart';
import 'persistent_tool_state.dart'; import 'persistent_tool_state.dart';
import 'project.dart'; import 'project.dart';
...@@ -60,6 +61,8 @@ FlutterProjectFactory get projectFactory { ...@@ -60,6 +61,8 @@ FlutterProjectFactory get projectFactory {
); );
} }
CocoaPodsValidator get cocoapodsValidator => context.get<CocoaPodsValidator>();
LocalEngineLocator get localEngineLocator => context.get<LocalEngineLocator>(); LocalEngineLocator get localEngineLocator => context.get<LocalEngineLocator>();
/// Currently active implementation of the file system. /// Currently active implementation of the file system.
......
...@@ -67,6 +67,15 @@ enum CocoaPodsStatus { ...@@ -67,6 +67,15 @@ enum CocoaPodsStatus {
brokenInstall, 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 { class CocoaPods {
CocoaPods({ CocoaPods({
@required FileSystem fileSystem, @required FileSystem fileSystem,
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import '../base/context.dart';
import '../base/user_messages.dart'; import '../base/user_messages.dart';
import '../doctor.dart'; import '../doctor.dart';
import 'cocoapods.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 { class CocoaPodsValidator extends DoctorValidator {
CocoaPodsValidator( CocoaPodsValidator(
CocoaPods cocoaPods, CocoaPods cocoaPods,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment