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
0fb288c5
Commit
0fb288c5
authored
Mar 03, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor to move an ios specific class out of globals.dart
parent
59664e4f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
19 deletions
+9
-19
executable.dart
packages/flutter_tools/lib/executable.dart
+0
-2
globals.dart
packages/flutter_tools/lib/src/globals.dart
+0
-4
ios_workflow.dart
packages/flutter_tools/lib/src/ios/ios_workflow.dart
+5
-6
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+2
-5
simulators.dart
packages/flutter_tools/lib/src/ios/simulators.dart
+2
-2
No files found.
packages/flutter_tools/lib/executable.dart
View file @
0fb288c5
...
@@ -32,7 +32,6 @@ import 'src/commands/update_packages.dart';
...
@@ -32,7 +32,6 @@ import 'src/commands/update_packages.dart';
import
'src/commands/upgrade.dart'
;
import
'src/commands/upgrade.dart'
;
import
'src/device.dart'
;
import
'src/device.dart'
;
import
'src/doctor.dart'
;
import
'src/doctor.dart'
;
import
'src/ios/mac.dart'
;
import
'src/runner/flutter_command_runner.dart'
;
import
'src/runner/flutter_command_runner.dart'
;
/// Main entry point for commands.
/// Main entry point for commands.
...
@@ -69,7 +68,6 @@ Future main(List<String> args) async {
...
@@ -69,7 +68,6 @@ Future main(List<String> args) async {
context
[
Logger
]
=
new
StdoutLogger
();
context
[
Logger
]
=
new
StdoutLogger
();
context
[
DeviceManager
]
=
new
DeviceManager
();
context
[
DeviceManager
]
=
new
DeviceManager
();
Doctor
.
initGlobal
();
Doctor
.
initGlobal
();
XCode
.
initGlobal
();
dynamic
result
=
await
runner
.
run
(
args
);
dynamic
result
=
await
runner
.
run
(
args
);
...
...
packages/flutter_tools/lib/src/globals.dart
View file @
0fb288c5
...
@@ -7,16 +7,12 @@ import 'base/context.dart';
...
@@ -7,16 +7,12 @@ import 'base/context.dart';
import
'base/logger.dart'
;
import
'base/logger.dart'
;
import
'device.dart'
;
import
'device.dart'
;
import
'doctor.dart'
;
import
'doctor.dart'
;
import
'ios/mac.dart'
;
DeviceManager
get
deviceManager
=>
context
[
DeviceManager
];
DeviceManager
get
deviceManager
=>
context
[
DeviceManager
];
Logger
get
logger
=>
context
[
Logger
];
Logger
get
logger
=>
context
[
Logger
];
AndroidSdk
get
androidSdk
=>
context
[
AndroidSdk
];
AndroidSdk
get
androidSdk
=>
context
[
AndroidSdk
];
Doctor
get
doctor
=>
context
[
Doctor
];
Doctor
get
doctor
=>
context
[
Doctor
];
// Mac specific globals - will be null on other platforms.
XCode
get
xcode
=>
context
[
XCode
];
/// Display an error level message to the user. Commands should use this if they
/// Display an error level message to the user. Commands should use this if they
/// fail in some way.
/// fail in some way.
void
printError
(
String
message
,
[
StackTrace
stackTrace
])
=>
logger
.
printError
(
message
,
stackTrace
);
void
printError
(
String
message
,
[
StackTrace
stackTrace
])
=>
logger
.
printError
(
message
,
stackTrace
);
...
...
packages/flutter_tools/lib/src/ios/ios_workflow.dart
View file @
0fb288c5
...
@@ -6,7 +6,6 @@ import 'dart:io';
...
@@ -6,7 +6,6 @@ import 'dart:io';
import
'../base/process.dart'
;
import
'../base/process.dart'
;
import
'../doctor.dart'
;
import
'../doctor.dart'
;
import
'../globals.dart'
;
import
'mac.dart'
;
import
'mac.dart'
;
class
IOSWorkflow
extends
Workflow
{
class
IOSWorkflow
extends
Workflow
{
...
@@ -15,11 +14,11 @@ class IOSWorkflow extends Workflow {
...
@@ -15,11 +14,11 @@ class IOSWorkflow extends Workflow {
bool
get
appliesToHostPlatform
=>
Platform
.
isMacOS
;
bool
get
appliesToHostPlatform
=>
Platform
.
isMacOS
;
// We need xcode (+simctl) to list simulator devices, and idevice_id to list real devices.
// We need xcode (+simctl) to list simulator devices, and idevice_id to list real devices.
bool
get
canListDevices
=>
xcod
e
.
isInstalledAndMeetsVersionCheck
;
bool
get
canListDevices
=>
XCode
.
instanc
e
.
isInstalledAndMeetsVersionCheck
;
// We need xcode to launch simulator devices, and ideviceinstaller and ios-deploy
// We need xcode to launch simulator devices, and ideviceinstaller and ios-deploy
// for real devices.
// for real devices.
bool
get
canLaunchDevices
=>
xcod
e
.
isInstalledAndMeetsVersionCheck
;
bool
get
canLaunchDevices
=>
XCode
.
instanc
e
.
isInstalledAndMeetsVersionCheck
;
ValidationResult
validate
()
{
ValidationResult
validate
()
{
Validator
iosValidator
=
new
Validator
(
Validator
iosValidator
=
new
Validator
(
...
@@ -28,15 +27,15 @@ class IOSWorkflow extends Workflow {
...
@@ -28,15 +27,15 @@ class IOSWorkflow extends Workflow {
);
);
ValidationType
xcodeExists
()
{
ValidationType
xcodeExists
()
{
return
xcod
e
.
isInstalled
?
ValidationType
.
installed
:
ValidationType
.
missing
;
return
XCode
.
instanc
e
.
isInstalled
?
ValidationType
.
installed
:
ValidationType
.
missing
;
};
};
ValidationType
xcodeVersionSatisfactory
()
{
ValidationType
xcodeVersionSatisfactory
()
{
return
xcod
e
.
isInstalledAndMeetsVersionCheck
?
ValidationType
.
installed
:
ValidationType
.
missing
;
return
XCode
.
instanc
e
.
isInstalledAndMeetsVersionCheck
?
ValidationType
.
installed
:
ValidationType
.
missing
;
};
};
ValidationType
xcodeEulaSigned
()
{
ValidationType
xcodeEulaSigned
()
{
return
xcod
e
.
eulaSigned
?
ValidationType
.
installed
:
ValidationType
.
missing
;
return
XCode
.
instanc
e
.
eulaSigned
?
ValidationType
.
installed
:
ValidationType
.
missing
;
};
};
ValidationType
brewExists
()
{
ValidationType
brewExists
()
{
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
0fb288c5
...
@@ -18,15 +18,12 @@ import 'setup_xcodeproj.dart';
...
@@ -18,15 +18,12 @@ import 'setup_xcodeproj.dart';
String
get
homeDirectory
=>
path
.
absolute
(
Platform
.
environment
[
'HOME'
]);
String
get
homeDirectory
=>
path
.
absolute
(
Platform
.
environment
[
'HOME'
]);
// TODO(devoncarew): Refactor functionality into XCode.
const
int
kXcodeRequiredVersionMajor
=
7
;
const
int
kXcodeRequiredVersionMajor
=
7
;
const
int
kXcodeRequiredVersionMinor
=
2
;
const
int
kXcodeRequiredVersionMinor
=
2
;
class
XCode
{
class
XCode
{
static
void
initGlobal
()
{
/// Returns [XCode] active in the current app context.
context
[
XCode
]
=
new
XCode
();
static
XCode
get
instance
=>
context
[
XCode
]
??
(
context
[
XCode
]
=
new
XCode
());
}
bool
get
isInstalledAndMeetsVersionCheck
=>
isInstalled
&&
xcodeVersionSatisfactory
;
bool
get
isInstalledAndMeetsVersionCheck
=>
isInstalled
&&
xcodeVersionSatisfactory
;
...
...
packages/flutter_tools/lib/src/ios/simulators.dart
View file @
0fb288c5
...
@@ -38,7 +38,7 @@ class IOSSimulatorUtils {
...
@@ -38,7 +38,7 @@ class IOSSimulatorUtils {
}
}
List
<
IOSSimulator
>
getAttachedDevices
()
{
List
<
IOSSimulator
>
getAttachedDevices
()
{
if
(!
xcod
e
.
isInstalledAndMeetsVersionCheck
)
if
(!
XCode
.
instanc
e
.
isInstalledAndMeetsVersionCheck
)
return
<
IOSSimulator
>[];
return
<
IOSSimulator
>[];
return
SimControl
.
instance
.
getConnectedDevices
().
map
((
SimDevice
device
)
{
return
SimControl
.
instance
.
getConnectedDevices
().
map
((
SimDevice
device
)
{
...
@@ -320,7 +320,7 @@ class IOSSimulator extends Device {
...
@@ -320,7 +320,7 @@ class IOSSimulator extends Device {
if
(
clearLogs
)
if
(
clearLogs
)
this
.
clearLogs
();
this
.
clearLogs
();
if
(!(
await
_setupUpdatedApplicationBundle
(
app
,
toolchain
)))
if
(!(
await
_setupUpdatedApplicationBundle
(
app
,
toolchain
)))
return
false
;
return
false
;
// Prepare launch arguments.
// Prepare launch arguments.
...
...
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