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
d60e9de7
Unverified
Commit
d60e9de7
authored
Feb 25, 2021
by
Jonah Williams
Committed by
GitHub
Feb 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] remove remaining extensions (#76743)
parent
fe2708c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
19 deletions
+17
-19
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+1
-1
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+8
-8
flutter_project_metadata.dart
packages/flutter_tools/lib/src/flutter_project_metadata.dart
+3
-3
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+4
-6
github_template.dart
...ages/flutter_tools/lib/src/reporting/github_template.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
d60e9de7
...
...
@@ -255,7 +255,7 @@ abstract class _BuildIOSSubCommand extends BuildSubCommand {
if
(!
result
.
success
)
{
await
diagnoseXcodeBuildFailure
(
result
,
globals
.
flutterUsage
,
globals
.
logger
);
throwToolExit
(
'Encountered error while
${xcodeBuildAction
.name
}
ing for
$logTarget
.'
);
throwToolExit
(
'Encountered error while
${xcodeBuildAction
ToString(xcodeBuildAction)
}
ing for
$logTarget
.'
);
}
if
(
buildInfo
.
codeSizeDirectory
!=
null
)
{
...
...
packages/flutter_tools/lib/src/commands/create.dart
View file @
d60e9de7
...
...
@@ -34,17 +34,17 @@ class CreateCommand extends CreateBase {
argParser
.
addOption
(
'template'
,
abbr:
't'
,
allowed:
FlutterProjectType
.
values
.
map
<
String
>(
(
FlutterProjectType
type
)
=>
type
.
name
),
allowed:
FlutterProjectType
.
values
.
map
<
String
>(
flutterProjectTypeToString
),
help:
'Specify the type of project to create.'
,
valueHelp:
'type'
,
allowedHelp:
<
String
,
String
>{
FlutterProjectType
.
app
.
name
:
'(default) Generate a Flutter application.'
,
FlutterProjectType
.
package
.
name
:
'Generate a shareable Flutter project containing modular '
flutterProjectTypeToString
(
FlutterProjectType
.
app
)
:
'(default) Generate a Flutter application.'
,
flutterProjectTypeToString
(
FlutterProjectType
.
package
)
:
'Generate a shareable Flutter project containing modular '
'Dart code.'
,
FlutterProjectType
.
plugin
.
name
:
'Generate a shareable Flutter project containing an API '
flutterProjectTypeToString
(
FlutterProjectType
.
plugin
)
:
'Generate a shareable Flutter project containing an API '
'in Dart code with a platform-specific implementation for Android, for iOS code, or '
'for both.'
,
FlutterProjectType
.
module
.
name
:
'Generate a project to add a Flutter module to an '
flutterProjectTypeToString
(
FlutterProjectType
.
module
)
:
'Generate a project to add a Flutter module to an '
'existing Android or iOS application.'
,
},
defaultsTo:
null
,
...
...
@@ -168,8 +168,8 @@ class CreateCommand extends CreateBase {
if
(
detectedProjectType
!=
null
&&
template
!=
detectedProjectType
&&
metadataExists
)
{
// We can only be definitive that this is the wrong type if the .metadata file
// exists and contains a type that doesn't match.
throwToolExit
(
"The requested template type '
${
template.name
}
' doesn't match the "
"existing template type of '
${
detectedProjectType.name
}
'."
);
throwToolExit
(
"The requested template type '
${
flutterProjectTypeToString(template)
}
' doesn't match the "
"existing template type of '
${
flutterProjectTypeToString(detectedProjectType)
}
'."
);
}
return
template
;
}
...
...
@@ -189,7 +189,7 @@ class CreateCommand extends CreateBase {
if
(
argResults
[
'template'
]
!=
null
&&
stringToProjectType
(
stringArg
(
'template'
)
??
'app'
)
!=
FlutterProjectType
.
app
)
{
throwToolExit
(
'Cannot specify --sample with a project type other than '
'"
${
FlutterProjectType.app.name
}
"'
);
'"
${
flutterProjectTypeToString(FlutterProjectType.app)
}
"'
);
}
// Fetch the sample from the server.
sampleCode
=
await
_fetchSampleFromServer
(
stringArg
(
'sample'
));
...
...
packages/flutter_tools/lib/src/flutter_project_metadata.dart
View file @
d60e9de7
...
...
@@ -25,14 +25,14 @@ enum FlutterProjectType {
plugin
,
}
extension
FlutterProjectTypeExtension
on
FlutterProjectType
{
String
get
name
=>
getEnumName
(
this
);
String
flutterProjectTypeToString
(
FlutterProjectType
type
)
{
return
getEnumName
(
type
);
}
FlutterProjectType
stringToProjectType
(
String
value
)
{
FlutterProjectType
result
;
for
(
final
FlutterProjectType
type
in
FlutterProjectType
.
values
)
{
if
(
value
==
type
.
name
)
{
if
(
value
==
flutterProjectTypeToString
(
type
)
)
{
result
=
type
;
break
;
}
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
d60e9de7
...
...
@@ -346,10 +346,10 @@ Future<XcodeBuildResult> buildXcodeProject({
initialBuildStatus
?.
cancel
();
initialBuildStatus
=
null
;
globals
.
printStatus
(
'Xcode
${
buildAction.name
}
done.'
.
padRight
(
kDefaultStatusPadding
+
1
)
'Xcode
${
xcodeBuildActionToString(buildAction)
}
done.'
.
padRight
(
kDefaultStatusPadding
+
1
)
+
getElapsedAsSeconds
(
sw
.
elapsed
).
padLeft
(
5
),
);
globals
.
flutterUsage
.
sendTiming
(
buildAction
.
name
,
'xcode-ios'
,
Duration
(
milliseconds:
sw
.
elapsedMilliseconds
));
globals
.
flutterUsage
.
sendTiming
(
xcodeBuildActionToString
(
buildAction
)
,
'xcode-ios'
,
Duration
(
milliseconds:
sw
.
elapsedMilliseconds
));
// Run -showBuildSettings again but with the exact same parameters as the
// build. showBuildSettings is reported to occasionally timeout. Here, we give
...
...
@@ -592,9 +592,8 @@ Future<void> diagnoseXcodeBuildFailure(XcodeBuildResult result, Usage flutterUsa
/// `clean`, `test`, `analyze`, and `install` are not supported.
enum
XcodeBuildAction
{
build
,
archive
}
extension
XcodeBuildActionExtension
on
XcodeBuildAction
{
String
get
name
{
switch
(
this
)
{
String
xcodeBuildActionToString
(
XcodeBuildAction
action
)
{
switch
(
action
)
{
case
XcodeBuildAction
.
build
:
return
'build'
;
case
XcodeBuildAction
.
archive
:
...
...
@@ -602,7 +601,6 @@ extension XcodeBuildActionExtension on XcodeBuildAction {
default
:
throw
UnsupportedError
(
'Unknown Xcode build action'
);
}
}
}
class
XcodeBuildResult
{
...
...
packages/flutter_tools/lib/src/reporting/github_template.dart
View file @
d60e9de7
...
...
@@ -121,7 +121,7 @@ ${_projectMetadataInformation()}
}
final
FlutterProjectMetadata
metadata
=
FlutterProjectMetadata
(
project
.
metadataFile
,
_logger
);
final
StringBuffer
description
=
StringBuffer
()
..
writeln
(
'**Type**:
${
metadata.projectType?.name
}
'
)
..
writeln
(
'**Type**:
${
flutterProjectTypeToString(metadata.projectType)
}
'
)
..
writeln
(
'**Version**:
${manifest.appVersion}
'
)
..
writeln
(
'**Material**:
${manifest.usesMaterialDesign}
'
)
..
writeln
(
'**Android X**:
${manifest.usesAndroidX}
'
)
...
...
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