Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8a902352
Unverified
Commit
8a902352
authored
Mar 26, 2020
by
Jenn Magder
Committed by
GitHub
Mar 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push iMobileDevice and iosDeploy instantiation into XCDevice constructor (#53307)
parent
e23c4796
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
21 deletions
+32
-21
context_runner.dart
packages/flutter_tools/lib/src/context_runner.dart
+3
-15
xcode.dart
packages/flutter_tools/lib/src/macos/xcode.dart
+18
-4
xcode_test.dart
...es/flutter_tools/test/general.shard/macos/xcode_test.dart
+11
-2
No files found.
packages/flutter_tools/lib/src/context_runner.dart
View file @
8a902352
...
...
@@ -33,9 +33,7 @@ import 'fuchsia/fuchsia_device.dart' show FuchsiaDeviceTools;
import
'fuchsia/fuchsia_sdk.dart'
show
FuchsiaSdk
,
FuchsiaArtifacts
;
import
'fuchsia/fuchsia_workflow.dart'
show
FuchsiaWorkflow
;
import
'globals.dart'
as
globals
;
import
'ios/ios_deploy.dart'
;
import
'ios/ios_workflow.dart'
;
import
'ios/mac.dart'
;
import
'ios/simulators.dart'
;
import
'ios/xcodeproj.dart'
;
import
'macos/cocoapods.dart'
;
...
...
@@ -207,19 +205,9 @@ Future<T> runInContext<T>(
XCDevice:
()
=>
XCDevice
(
processManager:
globals
.
processManager
,
logger:
globals
.
logger
,
iMobileDevice:
IMobileDevice
(
artifacts:
globals
.
artifacts
,
cache:
globals
.
cache
,
logger:
globals
.
logger
,
processManager:
globals
.
processManager
,
),
iosDeploy:
IOSDeploy
(
artifacts:
globals
.
artifacts
,
cache:
globals
.
cache
,
logger:
globals
.
logger
,
platform:
globals
.
platform
,
processManager:
globals
.
processManager
,
),
artifacts:
globals
.
artifacts
,
cache:
globals
.
cache
,
platform:
globals
.
platform
,
xcode:
globals
.
xcode
,
),
XcodeProjectInterpreter:
()
=>
XcodeProjectInterpreter
(
...
...
packages/flutter_tools/lib/src/macos/xcode.dart
View file @
8a902352
...
...
@@ -8,12 +8,14 @@ import 'package:meta/meta.dart';
import
'package:platform/platform.dart'
;
import
'package:process/process.dart'
;
import
'../artifacts.dart'
;
import
'../base/common.dart'
;
import
'../base/file_system.dart'
;
import
'../base/io.dart'
;
import
'../base/logger.dart'
;
import
'../base/process.dart'
;
import
'../build_info.dart'
;
import
'../cache.dart'
;
import
'../convert.dart'
;
import
'../globals.dart'
as
globals
;
import
'../ios/devices.dart'
;
...
...
@@ -195,15 +197,27 @@ class Xcode {
/// A utility class for interacting with Xcode xcdevice command line tools.
class
XCDevice
{
XCDevice
({
@required
Artifacts
artifacts
,
@required
Cache
cache
,
@required
ProcessManager
processManager
,
@required
Logger
logger
,
@required
Xcode
xcode
,
@required
IMobileDevice
iMobileDevice
,
@required
IOSDeploy
iosDeploy
,
@required
Platform
platform
,
})
:
_processUtils
=
ProcessUtils
(
logger:
logger
,
processManager:
processManager
),
_logger
=
logger
,
_iMobileDevice
=
iMobileDevice
,
_iosDeploy
=
iosDeploy
,
_iMobileDevice
=
IMobileDevice
(
artifacts:
artifacts
,
cache:
cache
,
logger:
logger
,
processManager:
processManager
,
),
_iosDeploy
=
IOSDeploy
(
artifacts:
artifacts
,
cache:
cache
,
logger:
logger
,
platform:
platform
,
processManager:
processManager
,
),
_xcode
=
xcode
;
final
ProcessUtils
_processUtils
;
...
...
packages/flutter_tools/test/general.shard/macos/xcode_test.dart
View file @
8a902352
...
...
@@ -3,10 +3,12 @@
// found in the LICENSE file.
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/artifacts.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
show
ProcessException
,
ProcessResult
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/ios/devices.dart'
;
import
'package:flutter_tools/src/ios/xcodeproj.dart'
;
import
'package:flutter_tools/src/macos/xcode.dart'
;
...
...
@@ -209,15 +211,20 @@ void main() {
group
(
'xcdevice'
,
()
{
XCDevice
xcdevice
;
MockXcode
mockXcode
;
MockArtifacts
mockArtifacts
;
MockCache
mockCache
;
setUp
(()
{
mockXcode
=
MockXcode
();
mockArtifacts
=
MockArtifacts
();
mockCache
=
MockCache
();
xcdevice
=
XCDevice
(
processManager:
processManager
,
logger:
logger
,
xcode:
mockXcode
,
iMobileDevice:
null
,
iosDeploy:
null
,
platform:
null
,
artifacts:
mockArtifacts
,
cache:
mockCache
,
);
});
...
...
@@ -610,3 +617,5 @@ class MockXcode extends Mock implements Xcode {}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockXcodeProjectInterpreter
extends
Mock
implements
XcodeProjectInterpreter
{}
class
MockPlatform
extends
Mock
implements
Platform
{}
class
MockArtifacts
extends
Mock
implements
Artifacts
{}
class
MockCache
extends
Mock
implements
Cache
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment