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 {
...
@@ -521,7 +521,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
Map
<
String
,
Map
<
String
,
String
>>
_buildSettingsByScheme
;
Map
<
String
,
Map
<
String
,
String
>>
_buildSettingsByScheme
;
Future
<
XcodeProjectInfo
>
projectInfo
()
async
{
Future
<
XcodeProjectInfo
>
projectInfo
()
async
{
if
(!
existsSync
()
||
!
globals
.
xcodeProjectInterpreter
.
isInstalled
)
{
if
(!
xcodeProject
.
existsSync
()
||
!
globals
.
xcodeProjectInterpreter
.
isInstalled
)
{
return
null
;
return
null
;
}
}
return
_projectInfo
??=
await
globals
.
xcodeProjectInterpreter
.
getInfo
(
hostAppRoot
.
path
);
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'
...
@@ -332,6 +332,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'from build settings, if no plist'
,
()
async
{
testWithMocks
(
'from build settings, if no plist'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
(
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
...
@@ -362,6 +363,7 @@ apply plugin: 'kotlin-android'
...
@@ -362,6 +363,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'from build settings and plist, if default variable'
,
()
async
{
testWithMocks
(
'from build settings and plist, if default variable'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
(
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
...
@@ -379,6 +381,7 @@ apply plugin: 'kotlin-android'
...
@@ -379,6 +381,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'from build settings and plist, by substitution'
,
()
async
{
testWithMocks
(
'from build settings and plist, by substitution'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
project
.
ios
.
defaultHostInfoPlist
.
createSync
(
recursive:
true
);
project
.
ios
.
defaultHostInfoPlist
.
createSync
(
recursive:
true
);
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
(
_
)
{
...
@@ -398,6 +401,7 @@ apply plugin: 'kotlin-android'
...
@@ -398,6 +401,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'fails with no flavor and defined schemes'
,
()
async
{
testWithMocks
(
'fails with no flavor and defined schemes'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getInfo
(
any
,
projectFilename:
anyNamed
(
'projectFilename'
))).
thenAnswer
(
(
_
)
{
when
(
mockXcodeProjectInterpreter
.
getInfo
(
any
,
projectFilename:
anyNamed
(
'projectFilename'
))).
thenAnswer
(
(
_
)
{
return
Future
<
XcodeProjectInfo
>.
value
(
XcodeProjectInfo
(<
String
>[],
<
String
>[],
<
String
>[
'free'
,
'paid'
],
logger
));
return
Future
<
XcodeProjectInfo
>.
value
(
XcodeProjectInfo
(<
String
>[],
<
String
>[],
<
String
>[
'free'
,
'paid'
],
logger
));
});
});
...
@@ -409,6 +413,7 @@ apply plugin: 'kotlin-android'
...
@@ -409,6 +413,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'handles case insensitive flavor'
,
()
async
{
testWithMocks
(
'handles case insensitive flavor'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
(
(
_
)
{
(
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
...
@@ -426,6 +431,7 @@ apply plugin: 'kotlin-android'
...
@@ -426,6 +431,7 @@ apply plugin: 'kotlin-android'
testWithMocks
(
'fails with flavor and default schemes'
,
()
async
{
testWithMocks
(
'fails with flavor and default schemes'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getInfo
(
any
,
projectFilename:
anyNamed
(
'projectFilename'
))).
thenAnswer
(
(
_
)
{
when
(
mockXcodeProjectInterpreter
.
getInfo
(
any
,
projectFilename:
anyNamed
(
'projectFilename'
))).
thenAnswer
(
(
_
)
{
return
Future
<
XcodeProjectInfo
>.
value
(
XcodeProjectInfo
(<
String
>[],
<
String
>[],
<
String
>[
'Runner'
],
logger
));
return
Future
<
XcodeProjectInfo
>.
value
(
XcodeProjectInfo
(<
String
>[],
<
String
>[],
<
String
>[
'Runner'
],
logger
));
});
});
...
@@ -479,6 +485,7 @@ apply plugin: 'kotlin-android'
...
@@ -479,6 +485,7 @@ apply plugin: 'kotlin-android'
testUsingContext
(
'app product name xcodebuild settings'
,
()
async
{
testUsingContext
(
'app product name xcodebuild settings'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
((
_
)
{
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
scheme:
anyNamed
(
'scheme'
))).
thenAnswer
((
_
)
{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
return
Future
<
Map
<
String
,
String
>>.
value
(<
String
,
String
>{
'FULL_PRODUCT_NAME'
:
'My App.app'
'FULL_PRODUCT_NAME'
:
'My App.app'
...
@@ -648,6 +655,7 @@ apply plugin: 'kotlin-android'
...
@@ -648,6 +655,7 @@ apply plugin: 'kotlin-android'
testUsingContext
(
'has watch companion'
,
()
async
{
testUsingContext
(
'has watch companion'
,
()
async
{
final
FlutterProject
project
=
await
someProject
();
final
FlutterProject
project
=
await
someProject
();
project
.
ios
.
xcodeProject
.
createSync
();
project
.
ios
.
hostAppRoot
.
childDirectory
(
'WatchTarget'
).
childFile
(
'Info.plist'
).
createSync
(
recursive:
true
);
project
.
ios
.
hostAppRoot
.
childDirectory
(
'WatchTarget'
).
childFile
(
'Info.plist'
).
createSync
(
recursive:
true
);
when
(
mockPlistUtils
.
getValueFromFile
(
any
,
'WKCompanionAppBundleIdentifier'
)).
thenReturn
(
'io.flutter.someProject'
);
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