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
1eb1e222
Unverified
Commit
1eb1e222
authored
Sep 30, 2019
by
Jenn Magder
Committed by
GitHub
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip pod initialization if version >= 1.8.0. (#41491)
parent
4891e4a3
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
19 deletions
+23
-19
.cirrus.yml
.cirrus.yml
+2
-2
Podfile
dev/integration_tests/release_smoke_test/ios/Podfile
+0
-3
cocoapods.dart
packages/flutter_tools/lib/src/macos/cocoapods.dart
+11
-5
Podfile-ios-objc
packages/flutter_tools/templates/cocoapods/Podfile-ios-objc
+0
-3
Podfile-ios-swift
packages/flutter_tools/templates/cocoapods/Podfile-ios-swift
+0
-3
Podfile-macos
packages/flutter_tools/templates/cocoapods/Podfile-macos
+0
-3
cocoapods_test.dart
...lutter_tools/test/general.shard/macos/cocoapods_test.dart
+10
-0
No files found.
.cirrus.yml
View file @
1eb1e222
...
...
@@ -414,7 +414,7 @@ task:
print_date_script
:
-
date
install_cocoapods_script
:
-
sudo gem install cocoapods -
v 1.7.5 -
-no-document
-
sudo gem install cocoapods --no-document
git_fetch_script
:
-
git clean -xfd
-
git fetch origin
...
...
@@ -486,7 +486,7 @@ task:
print_date_script
:
-
date
install_cocoapods_script
:
-
sudo gem install cocoapods -
v 1.7.5 -
-no-document
-
sudo gem install cocoapods --no-document
git_fetch_script
:
-
git clean -xfd
-
git fetch origin
...
...
dev/integration_tests/release_smoke_test/ios/Podfile
View file @
1eb1e222
# Using a CDN with CocoaPods 1.7.2 or later can save a lot of time on pod installation, but it's experimental rather than the default.
# source 'https://cdn.cocoapods.org/'
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
...
...
packages/flutter_tools/lib/src/macos/cocoapods.dart
View file @
1eb1e222
...
...
@@ -35,12 +35,10 @@ const String brokenCocoaPodsConsequence = '''
This
can
usually
be
fixed
by
re
-
installing
CocoaPods
.
For
more
info
,
see
https:
//github.com/flutter/flutter/issues/14293.''';
const
String
cocoaPodsInstallInstructions
=
'''
sudo gem install cocoapods
pod setup'''
;
sudo gem install cocoapods'''
;
const
String
cocoaPodsUpgradeInstructions
=
'''
sudo gem install cocoapods
pod setup'''
;
sudo gem install cocoapods'''
;
CocoaPods
get
cocoaPods
=>
context
.
get
<
CocoaPods
>();
...
...
@@ -105,12 +103,20 @@ class CocoaPods {
/// Whether CocoaPods ran 'pod setup' once where the costly pods' specs are
/// cloned.
///
/// Versions >= 1.8.0 do not require 'pod setup' and default to a CDN instead
/// of a locally cloned repository.
/// See http://blog.cocoapods.org/CocoaPods-1.8.0-beta/
///
/// A user can override the default location via the CP_REPOS_DIR environment
/// variable.
///
/// See https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/config.rb#L138
/// for details of this variable.
Future
<
bool
>
get
isCocoaPodsInitialized
{
Future
<
bool
>
get
isCocoaPodsInitialized
async
{
final
Version
installedVersion
=
Version
.
parse
(
await
cocoaPodsVersionText
);
if
(
installedVersion
!=
null
&&
installedVersion
>=
Version
.
parse
(
'1.8.0'
))
{
return
true
;
}
final
String
cocoapodsReposDir
=
platform
.
environment
[
'CP_REPOS_DIR'
]
??
fs
.
path
.
join
(
homeDirPath
,
'.cocoapods'
,
'repos'
);
return
fs
.
isDirectory
(
fs
.
path
.
join
(
cocoapodsReposDir
,
'master'
));
}
...
...
packages/flutter_tools/templates/cocoapods/Podfile-ios-objc
View file @
1eb1e222
# Using a CDN with CocoaPods 1.7.2 or later can save a lot of time on pod installation, but it's experimental rather than the default.
# source 'https://cdn.cocoapods.org/'
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
...
...
packages/flutter_tools/templates/cocoapods/Podfile-ios-swift
View file @
1eb1e222
# Using a CDN with CocoaPods 1.7.2 or later can save a lot of time on pod installation, but it's experimental rather than the default.
# source 'https://cdn.cocoapods.org/'
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
...
...
packages/flutter_tools/templates/cocoapods/Podfile-macos
View file @
1eb1e222
# Using a CDN with CocoaPods 1.7.2 or later can save a lot of time on pod installation, but it's experimental rather than the default.
# source 'https://cdn.cocoapods.org/'
platform :osx, '10.11'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
...
...
packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
View file @
1eb1e222
...
...
@@ -160,6 +160,16 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'detects initialized over 1.8.0'
,
()
async
{
pretendPodIsInstalled
();
pretendPodVersionIs
(
'1.8.0'
);
expect
(
await
cocoaPodsUnderTest
.
isCocoaPodsInitialized
,
isTrue
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
Platform:
()
=>
FakePlatform
(),
FileSystem:
()
=>
fs
,
});
});
group
(
'Setup Podfile'
,
()
{
...
...
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