Commit 92750833 authored by xster's avatar xster Committed by GitHub

Stop sending cocoapods stats (#11120)

* Disable cocoapods stats

* Add a comment for code readers

* fix new test
parent 6a49419b
...@@ -117,7 +117,12 @@ class CocoaPods { ...@@ -117,7 +117,12 @@ class CocoaPods {
final ProcessResult result = await processManager.run( final ProcessResult result = await processManager.run(
<String>['pod', 'install', '--verbose'], <String>['pod', 'install', '--verbose'],
workingDirectory: bundle.path, workingDirectory: bundle.path,
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': engineDirectory}, environment: <String, String>{
'FLUTTER_FRAMEWORK_DIR': engineDirectory,
// See https://github.com/flutter/flutter/issues/10873.
// CocoaPods analytics adds a lot of latency.
'COCOAPODS_DISABLE_STATS': 'true',
},
); );
status.stop(); status.stop();
if (logger.isVerbose || result.exitCode != 0) { if (logger.isVerbose || result.exitCode != 0) {
......
...@@ -41,7 +41,7 @@ void main() { ...@@ -41,7 +41,7 @@ void main() {
when(mockProcessManager.run( when(mockProcessManager.run(
<String>['pod', 'install', '--verbose'], <String>['pod', 'install', '--verbose'],
workingDirectory: 'project/ios', workingDirectory: 'project/ios',
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path'}, environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path', 'COCOAPODS_DISABLE_STATS': 'true'},
)).thenReturn(exitsHappy); )).thenReturn(exitsHappy);
}); });
...@@ -56,7 +56,7 @@ void main() { ...@@ -56,7 +56,7 @@ void main() {
verify(mockProcessManager.run( verify(mockProcessManager.run(
<String>['pod', 'install', '--verbose'], <String>['pod', 'install', '--verbose'],
workingDirectory: 'project/ios', workingDirectory: 'project/ios',
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path'}, environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path', 'COCOAPODS_DISABLE_STATS': 'true'},
)); ));
}, },
overrides: <Type, Generator>{ overrides: <Type, Generator>{
...@@ -77,7 +77,7 @@ void main() { ...@@ -77,7 +77,7 @@ void main() {
verify(mockProcessManager.run( verify(mockProcessManager.run(
<String>['pod', 'install', '--verbose'], <String>['pod', 'install', '--verbose'],
workingDirectory: 'project/ios', workingDirectory: 'project/ios',
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path'}, environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path', 'COCOAPODS_DISABLE_STATS': 'true'},
)); ));
}, },
overrides: <Type, Generator>{ overrides: <Type, Generator>{
...@@ -99,7 +99,7 @@ void main() { ...@@ -99,7 +99,7 @@ void main() {
verify(mockProcessManager.run( verify(mockProcessManager.run(
<String>['pod', 'install', '--verbose'], <String>['pod', 'install', '--verbose'],
workingDirectory: 'project/ios', workingDirectory: 'project/ios',
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path'}, environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path', 'COCOAPODS_DISABLE_STATS': 'true'},
)); ));
}, },
overrides: <Type, Generator>{ overrides: <Type, Generator>{
...@@ -122,7 +122,7 @@ void main() { ...@@ -122,7 +122,7 @@ void main() {
verifyNever(mockProcessManager.run( verifyNever(mockProcessManager.run(
<String>['pod', 'install', '--verbose'], <String>['pod', 'install', '--verbose'],
workingDirectory: 'project/ios', workingDirectory: 'project/ios',
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path'}, environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': 'engine/path', 'COCOAPODS_DISABLE_STATS': 'true'},
)); ));
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment