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
4447c0aa
Commit
4447c0aa
authored
Nov 30, 2017
by
Alexander Aprelev
Committed by
Ian Hickson
Nov 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --preview-dart-2 option support for ios builds (#13251)
parent
cb7599aa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
3 deletions
+20
-3
xcode_backend.sh
packages/flutter_tools/bin/xcode_backend.sh
+8
-1
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+3
-1
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+1
-0
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+3
-1
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+5
-0
No files found.
packages/flutter_tools/bin/xcode_backend.sh
View file @
4447c0aa
...
...
@@ -88,6 +88,11 @@ BuildApp() {
local_engine_flag
=
"--local-engine=
$LOCAL_ENGINE
"
fi
local
preview_dart_2_flag
=
""
if
[[
-n
"
$PREVIEW_DART_2
"
]]
;
then
preview_dart_2_flag
=
"--preview-dart-2"
fi
if
[[
"
$CURRENT_ARCH
"
!=
"x86_64"
]]
;
then
local
aot_flags
=
""
if
[[
"
$build_mode
"
==
"debug"
]]
;
then
...
...
@@ -101,7 +106,8 @@ BuildApp() {
--target-platform
=
ios
\
--target
=
"
${
target_path
}
"
\
${
aot_flags
}
\
${
local_engine_flag
}
${
local_engine_flag
}
\
${
preview_dart_2_flag
}
if
[[
$?
-ne
0
]]
;
then
EchoError
"Failed to build
${
project_path
}
."
...
...
@@ -133,6 +139,7 @@ BuildApp() {
--working-dir
=
"
${
build_dir
}
/flx"
\
${
precompilation_flag
}
\
${
local_engine_flag
}
\
${
preview_dart_2_flag
}
\
if
[[
$?
-ne
0
]]
;
then
EchoError
"Failed to package
${
project_path
}
."
...
...
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
4447c0aa
...
...
@@ -29,6 +29,7 @@ class BuildIOSCommand extends BuildSubCommand {
argParser
.
addFlag
(
'simulator'
,
help:
'Build for the iOS simulator instead of the device.'
);
argParser
.
addFlag
(
'codesign'
,
negatable:
true
,
defaultsTo:
true
,
help:
'Codesign the application bundle (only available on device builds).'
);
argParser
.
addFlag
(
'preview-dart-2'
,
negatable:
false
);
}
@override
...
...
@@ -70,7 +71,8 @@ class BuildIOSCommand extends BuildSubCommand {
buildInfo:
buildInfo
,
target:
targetFile
,
buildForDevice:
!
forSimulator
,
codesign:
shouldCodesign
codesign:
shouldCodesign
,
previewDart2
:
argResults
[
'preview-dart-2'
],
);
if
(!
result
.
success
)
{
...
...
packages/flutter_tools/lib/src/commands/create.dart
View file @
4447c0aa
...
...
@@ -214,6 +214,7 @@ class CreateCommand extends FlutterCommand {
buildInfo:
BuildInfo
.
debug
,
target:
flx
.
defaultMainPath
,
hasPlugins:
generatePlugin
,
previewDart2:
false
,
);
if
(
argResults
[
'pub'
])
{
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
4447c0aa
...
...
@@ -205,6 +205,7 @@ Future<XcodeBuildResult> buildXcodeProject({
bool
buildForDevice
,
bool
codesign:
true
,
bool
usesTerminalUi:
true
,
bool
previewDart2:
false
,
})
async
{
if
(!
_checkXcodeVersion
())
return
new
XcodeBuildResult
(
success:
false
);
...
...
@@ -264,7 +265,8 @@ Future<XcodeBuildResult> buildXcodeProject({
projectPath:
fs
.
currentDirectory
.
path
,
buildInfo:
buildInfo
,
target:
target
,
hasPlugins:
hasFlutterPlugins
hasPlugins:
hasFlutterPlugins
,
previewDart2:
previewDart2
,
);
final
List
<
String
>
commands
=
<
String
>[
...
...
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
4447c0aa
...
...
@@ -24,6 +24,7 @@ void updateXcodeGeneratedProperties({
@required
BuildInfo
buildInfo
,
@required
String
target
,
@required
bool
hasPlugins
,
@required
bool
previewDart2
,
})
{
final
StringBuffer
localsBuffer
=
new
StringBuffer
();
...
...
@@ -53,6 +54,10 @@ void updateXcodeGeneratedProperties({
localsBuffer
.
writeln
(
'LOCAL_ENGINE=
${localEngineArtifacts.engineOutPath}
'
);
}
if
(
previewDart2
)
{
localsBuffer
.
writeln
(
'PREVIEW_DART_2=true'
);
}
// Add dependency to CocoaPods' generated project only if plugins are used.
if
(
hasPlugins
)
localsBuffer
.
writeln
(
'#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"'
);
...
...
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