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
f410ca80
Commit
f410ca80
authored
Jun 30, 2016
by
Todd Volkert
Committed by
GitHub
Jun 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include target in revision string, since it affects the xcode config (#4795)
parent
14c53211
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-1
setup_xcodeproj.dart
packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart
+5
-4
No files found.
packages/flutter_tools/lib/src/ios/mac.dart
View file @
f410ca80
...
@@ -106,7 +106,7 @@ Future<XcodeBuildResult> buildXcodeProject({
...
@@ -106,7 +106,7 @@ Future<XcodeBuildResult> buildXcodeProject({
})
async
{
})
async
{
String
flutterProjectPath
=
Directory
.
current
.
path
;
String
flutterProjectPath
=
Directory
.
current
.
path
;
if
(
xcodeProjectRequiresUpdate
(
mode
))
{
if
(
xcodeProjectRequiresUpdate
(
mode
,
target
))
{
printTrace
(
'Initializing the Xcode project.'
);
printTrace
(
'Initializing the Xcode project.'
);
if
((
await
setupXcodeProjectHarness
(
flutterProjectPath
,
mode
,
target
))
!=
0
)
{
if
((
await
setupXcodeProjectHarness
(
flutterProjectPath
,
mode
,
target
))
!=
0
)
{
printError
(
'Could not initialize the Xcode project.'
);
printError
(
'Could not initialize the Xcode project.'
);
...
...
packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart
View file @
f410ca80
...
@@ -42,7 +42,7 @@ void updateXcodeGeneratedProperties(String projectPath, BuildMode mode, String t
...
@@ -42,7 +42,7 @@ void updateXcodeGeneratedProperties(String projectPath, BuildMode mode, String t
localsFile
.
writeAsStringSync
(
localsBuffer
.
toString
());
localsFile
.
writeAsStringSync
(
localsBuffer
.
toString
());
}
}
bool
xcodeProjectRequiresUpdate
(
BuildMode
mode
)
{
bool
xcodeProjectRequiresUpdate
(
BuildMode
mode
,
String
target
)
{
File
revisionFile
=
new
File
(
path
.
join
(
Directory
.
current
.
path
,
'ios'
,
'.generated'
,
'REVISION'
));
File
revisionFile
=
new
File
(
path
.
join
(
Directory
.
current
.
path
,
'ios'
,
'.generated'
,
'REVISION'
));
// If the revision stamp does not exist, the Xcode project definitely requires
// If the revision stamp does not exist, the Xcode project definitely requires
...
@@ -52,7 +52,7 @@ bool xcodeProjectRequiresUpdate(BuildMode mode) {
...
@@ -52,7 +52,7 @@ bool xcodeProjectRequiresUpdate(BuildMode mode) {
return
true
;
return
true
;
}
}
if
(
revisionFile
.
readAsStringSync
()
!=
_getCurrentXcodeRevisionString
(
mode
))
{
if
(
revisionFile
.
readAsStringSync
()
!=
_getCurrentXcodeRevisionString
(
mode
,
target
))
{
printTrace
(
"The revision stamp and the Flutter engine revision differ or the build mode has changed."
);
printTrace
(
"The revision stamp and the Flutter engine revision differ or the build mode has changed."
);
printTrace
(
"Project needs to be updated."
);
printTrace
(
"Project needs to be updated."
);
return
true
;
return
true
;
...
@@ -75,7 +75,7 @@ Future<int> setupXcodeProjectHarness(String flutterProjectPath, BuildMode mode,
...
@@ -75,7 +75,7 @@ Future<int> setupXcodeProjectHarness(String flutterProjectPath, BuildMode mode,
// Step 3: Write the REVISION file
// Step 3: Write the REVISION file
File
revisionFile
=
new
File
(
path
.
join
(
xcodeProjectPath
,
'REVISION'
));
File
revisionFile
=
new
File
(
path
.
join
(
xcodeProjectPath
,
'REVISION'
));
revisionFile
.
createSync
();
revisionFile
.
createSync
();
revisionFile
.
writeAsStringSync
(
_getCurrentXcodeRevisionString
(
mode
));
revisionFile
.
writeAsStringSync
(
_getCurrentXcodeRevisionString
(
mode
,
target
));
// Step 4: Tell the user the location of the generated project.
// Step 4: Tell the user the location of the generated project.
printStatus
(
'Xcode project created in
$iosFilesPath
/.'
);
printStatus
(
'Xcode project created in
$iosFilesPath
/.'
);
...
@@ -83,7 +83,8 @@ Future<int> setupXcodeProjectHarness(String flutterProjectPath, BuildMode mode,
...
@@ -83,7 +83,8 @@ Future<int> setupXcodeProjectHarness(String flutterProjectPath, BuildMode mode,
return
0
;
return
0
;
}
}
String
_getCurrentXcodeRevisionString
(
BuildMode
mode
)
=>
(
new
StringBuffer
()
String
_getCurrentXcodeRevisionString
(
BuildMode
mode
,
String
target
)
=>
(
new
StringBuffer
()
..
write
(
'
${FlutterVersion.getVersion().frameworkRevision}
'
)
..
write
(
'
${FlutterVersion.getVersion().frameworkRevision}
'
)
..
write
(
'-
${tools.isLocalEngine ? tools.engineBuildPath : getModeName(mode)}
'
)
..
write
(
'-
${tools.isLocalEngine ? tools.engineBuildPath : getModeName(mode)}
'
)
..
write
(
'::
$target
'
)
).
toString
();
).
toString
();
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