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
cbc7ce08
Unverified
Commit
cbc7ce08
authored
May 26, 2021
by
Jenn Magder
Committed by
GitHub
May 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up null assumptions for Xcode and CocoaPods classes (#83442)
parent
883cb3e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+2
-2
xcode_build_settings.dart
packages/flutter_tools/lib/src/ios/xcode_build_settings.dart
+5
-4
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+1
-1
cocoapods.dart
packages/flutter_tools/lib/src/macos/cocoapods.dart
+4
-4
cocoapods_validator.dart
...ages/flutter_tools/lib/src/macos/cocoapods_validator.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/build_info.dart
View file @
cbc7ce08
...
...
@@ -397,7 +397,7 @@ enum EnvironmentType {
simulator
,
}
String
?
validatedBuildNumberForPlatform
(
TargetPlatform
targetPlatform
,
String
buildNumber
,
Logger
logger
)
{
String
?
validatedBuildNumberForPlatform
(
TargetPlatform
targetPlatform
,
String
?
buildNumber
,
Logger
logger
)
{
if
(
buildNumber
==
null
)
{
return
null
;
}
...
...
@@ -444,7 +444,7 @@ String? validatedBuildNumberForPlatform(TargetPlatform targetPlatform, String bu
return
buildNumber
;
}
String
?
validatedBuildNameForPlatform
(
TargetPlatform
targetPlatform
,
String
buildName
,
Logger
logger
)
{
String
?
validatedBuildNameForPlatform
(
TargetPlatform
targetPlatform
,
String
?
buildName
,
Logger
logger
)
{
if
(
buildName
==
null
)
{
return
null
;
}
...
...
packages/flutter_tools/lib/src/ios/xcode_build_settings.dart
View file @
cbc7ce08
...
...
@@ -109,7 +109,7 @@ void _updateGeneratedEnvironmentVariablesScript({
/// Build name parsed and validated from build info and manifest. Used for CFBundleShortVersionString.
String
parsedBuildName
(
{
@required
FlutterManifest
manifest
,
@required
BuildInfo
buildInfo
,
BuildInfo
buildInfo
,
})
{
final
String
buildNameToParse
=
buildInfo
?.
buildName
??
manifest
.
buildName
;
return
validatedBuildNameForPlatform
(
TargetPlatform
.
ios
,
buildNameToParse
,
globals
.
logger
);
...
...
@@ -118,7 +118,7 @@ String parsedBuildName({
/// Build number parsed and validated from build info and manifest. Used for CFBundleVersion.
String
parsedBuildNumber
(
{
@required
FlutterManifest
manifest
,
@required
BuildInfo
buildInfo
,
BuildInfo
buildInfo
,
})
{
String
buildNumberToParse
=
buildInfo
?.
buildNumber
??
manifest
.
buildNumber
;
final
String
buildNumber
=
validatedBuildNumberForPlatform
(
...
...
@@ -173,8 +173,9 @@ List<String> _xcodeBuildSettingsLines({
final
String
buildNumber
=
parsedBuildNumber
(
manifest:
project
.
manifest
,
buildInfo:
buildInfo
)
??
'1'
;
xcodeBuildSettings
.
add
(
'FLUTTER_BUILD_NUMBER=
$buildNumber
'
);
if
(
globals
.
artifacts
is
LocalEngineArtifacts
)
{
final
LocalEngineArtifacts
localEngineArtifacts
=
globals
.
artifacts
as
LocalEngineArtifacts
;
final
Artifacts
artifacts
=
globals
.
artifacts
;
if
(
artifacts
is
LocalEngineArtifacts
)
{
final
LocalEngineArtifacts
localEngineArtifacts
=
artifacts
;
final
String
engineOutPath
=
localEngineArtifacts
.
engineOutPath
;
xcodeBuildSettings
.
add
(
'FLUTTER_ENGINE=
${globals.fs.path.dirname(globals.fs.path.dirname(engineOutPath))}
'
);
...
...
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
cbc7ce08
...
...
@@ -389,7 +389,7 @@ class XcodeProjectInfo {
}
/// Returns unique scheme matching [buildInfo], or null, if there is no unique
/// best match.
String
?
schemeFor
(
BuildInfo
buildInfo
)
{
String
?
schemeFor
(
BuildInfo
?
buildInfo
)
{
final
String
expectedScheme
=
expectedSchemeFor
(
buildInfo
);
if
(
schemes
.
contains
(
expectedScheme
))
{
return
expectedScheme
;
...
...
packages/flutter_tools/lib/src/macos/cocoapods.dart
View file @
cbc7ce08
...
...
@@ -71,8 +71,8 @@ enum CocoaPodsStatus {
brokenInstall
,
}
String
get
cocoaPodsMinimumVersion
=>
'1.9.0'
;
String
get
cocoaPodsRecommendedVersion
=>
'1.10.0'
;
const
Version
cocoaPodsMinimumVersion
=
Version
.
withText
(
1
,
9
,
0
,
'1.9.0'
)
;
const
Version
cocoaPodsRecommendedVersion
=
Version
.
withText
(
1
,
10
,
0
,
'1.10.0'
)
;
/// Cocoapods is a dependency management solution for iOS and macOS applications.
///
...
...
@@ -142,10 +142,10 @@ class CocoaPods {
if
(
installedVersion
==
null
)
{
return
CocoaPodsStatus
.
unknownVersion
;
}
if
(
installedVersion
<
Version
.
parse
(
cocoaPodsMinimumVersion
)
)
{
if
(
installedVersion
<
cocoaPodsMinimumVersion
)
{
return
CocoaPodsStatus
.
belowMinimumVersion
;
}
if
(
installedVersion
<
Version
.
parse
(
cocoaPodsRecommendedVersion
)
)
{
if
(
installedVersion
<
cocoaPodsRecommendedVersion
)
{
return
CocoaPodsStatus
.
belowRecommendedVersion
;
}
return
CocoaPodsStatus
.
recommended
;
...
...
packages/flutter_tools/lib/src/macos/cocoapods_validator.dart
View file @
cbc7ce08
...
...
@@ -52,7 +52,7 @@ class CocoaPodsValidator extends DoctorValidator {
status
=
ValidationType
.
partial
;
final
String
currentVersionText
=
await
_cocoaPods
.
cocoaPodsVersionText
;
messages
.
add
(
ValidationMessage
.
hint
(
_userMessages
.
cocoaPodsOutdated
(
currentVersionText
,
cocoaPodsRecommendedVersion
,
noCocoaPodsConsequence
,
cocoaPodsInstallInstructions
)));
_userMessages
.
cocoaPodsOutdated
(
currentVersionText
,
cocoaPodsRecommendedVersion
.
toString
()
,
noCocoaPodsConsequence
,
cocoaPodsInstallInstructions
)));
}
}
...
...
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