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
fe670c04
Unverified
Commit
fe670c04
authored
Jul 23, 2020
by
Jenn Magder
Committed by
GitHub
Jul 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only try to get build settings if the Xcode project exists (#61979)
parent
fe781e7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
project.dart
packages/flutter_tools/lib/src/project.dart
+1
-1
project_test.dart
packages/flutter_tools/test/general.shard/project_test.dart
+8
-0
No files found.
packages/flutter_tools/lib/src/project.dart
View file @
fe670c04
...
...
@@ -521,7 +521,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
Map
<
String
,
Map
<
String
,
String
>>
_buildSettingsByScheme
;
Future
<
XcodeProjectInfo
>
projectInfo
()
async
{
if
(!
existsSync
()
||
!
globals
.
xcodeProjectInterpreter
.
isInstalled
)
{
if
(!
xcodeProject
.
existsSync
()
||
!
globals
.
xcodeProjectInterpreter
.
isInstalled
)
{
return
null
;
}
return
_projectInfo
??=
await
globals
.
xcodeProjectInterpreter
.
getInfo
(
hostAppRoot
.
path
);
...
...
packages/flutter_tools/test/general.shard/project_test.dart
View file @
fe670c04
...
...
@@ -332,6 +332,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'from build settings, if no plist'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
...
...
@@ -362,6 +363,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'from build settings and plist, if default variable'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
...
...
@@ -379,6 +381,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'from build settings and plist, by substitution'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
project
.
ios
.
defaultHostInfoPlist
.
createSync
(
recursive:
true
);
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
...
...
@@ -398,6 +401,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'fails with no flavor and defined schemes'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getInfo
(
any
,
projectFilename:
anyNamed
(
'projectFilename'
))).
thenAnswer
(
(
_
)
{
return
Future
<
XcodeProjectInfo
>.
value
(
XcodeProjectInfo
(<
String
>[],
<
String
>[],
<
String
>[
'free'
,
'paid'
],
logger
));
});
...
...
@@ -409,6 +413,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'handles case insensitive flavor'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
...
...
@@ -426,6 +431,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'fails with flavor and default schemes'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getInfo
(
any
,
projectFilename:
anyNamed
(
'projectFilename'
))).
thenAnswer
(
(
_
)
{
return
Future
<
XcodeProjectInfo
>.
value
(
XcodeProjectInfo
(<
String
>[],
<
String
>[],
<
String
>[
'Runner'
],
logger
));
});
...
...
@@ -479,6 +485,7 @@ apply plugin: 'kotlin-android'
testUsingContext
(
'app product name xcodebuild settings'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
((
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
'FULL_PRODUCT_NAME'
:
'My App.app'
...
...
@@ -648,6 +655,7 @@ apply plugin: 'kotlin-android'
testUsingContext
(
'has watch companion'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
project
.
ios
.
hostAppRoot
.
childDirectory
(
'WatchTarget'
).
childFile
(
'Info.plist'
).
createSync
(
recursive:
true
);
when
(
mockPlistUtils
.
getValueFromFile
(
any
,
'WKCompanionAppBundleIdentifier'
)).
thenReturn
(
'io.flutter.someProject'
);
...
...
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