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
6a4dd4cf
Unverified
Commit
6a4dd4cf
authored
Mar 19, 2021
by
Jenn Magder
Committed by
GitHub
Mar 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip linking on Flutter for CocoaPods transitive dependencies (#78592)
parent
197b440e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletion
+44
-1
build_ios_framework_module_test.dart
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
+38
-1
podhelper.rb
packages/flutter_tools/bin/podhelper.rb
+6
-0
No files found.
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
View file @
6a4dd4cf
...
...
@@ -66,7 +66,7 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
String
content
=
pubspec
.
readAsStringSync
();
content
=
content
.
replaceFirst
(
'
\n
dependencies:
\n
'
,
'
\n
dependencies:
\n
device_info: 0.4.1
\n
package_info: 0.4.0+9
\n
'
,
'
\n
dependencies:
\n
device_info: 0.4.1
\n
package_info: 0.4.0+9
\n
connectivity: 3.0.3
\n
'
,
);
pubspec
.
writeAsStringSync
(
content
,
flush:
true
);
await
inDirectory
(
projectDir
,
()
async
{
...
...
@@ -284,6 +284,21 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'device_info'
,
);
await
_checkBitcode
(
pluginFrameworkPath
,
mode
);
if
(!
await
_linksOnFlutter
(
pluginFrameworkPath
))
{
throw
TaskResult
.
failure
(
'
$pluginFrameworkPath
does not link on Flutter'
);
}
final
String
transitiveDependencyFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'Reachability.xcframework'
,
localXcodeArmDirectoryName
,
'Reachability.framework'
,
'Reachability'
,
);
if
(
await
_linksOnFlutter
(
transitiveDependencyFrameworkPath
))
{
throw
TaskResult
.
failure
(
'Transitive dependency
$transitiveDependencyFrameworkPath
unexpectedly links on Flutter'
);
}
checkFileExists
(
path
.
join
(
outputPath
,
...
...
@@ -407,6 +422,18 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
mode
,
'package_info.xcframework'
,
));
checkDirectoryExists
(
path
.
join
(
cocoapodsOutputPath
,
mode
,
'connectivity.xcframework'
,
));
checkDirectoryExists
(
path
.
join
(
cocoapodsOutputPath
,
mode
,
'Reachability.xcframework'
,
));
}
if
(
File
(
path
.
join
(
...
...
@@ -443,3 +470,13 @@ Future<String> _dylibSymbols(String pathToDylib) {
'arm64'
,
]);
}
Future
<
bool
>
_linksOnFlutter
(
String
pathToBinary
)
async
{
final
String
loadCommands
=
await
eval
(
'otool'
,
<
String
>[
'-l'
,
'-arch'
,
'arm64'
,
pathToBinary
,
]);
return
loadCommands
.
contains
(
'Flutter.framework'
);
}
packages/flutter_tools/bin/podhelper.rb
View file @
6a4dd4cf
...
...
@@ -33,6 +33,9 @@ end
def
flutter_additional_ios_build_settings
(
target
)
return
unless
target
.
platform_name
==
:ios
# Return if it's not a Flutter plugin (transitive dependency).
return
unless
target
.
dependencies
.
any?
{
|
dependency
|
dependency
.
name
==
'Flutter'
}
# [target.deployment_target] is a [String] formatted as "8.0".
inherit_deployment_target
=
target
.
deployment_target
[
/\d+/
].
to_i
<
9
...
...
@@ -78,6 +81,9 @@ end
def
flutter_additional_macos_build_settings
(
target
)
return
unless
target
.
platform_name
==
:osx
# Return if it's not a Flutter plugin (transitive dependency).
return
unless
target
.
dependencies
.
any?
{
|
dependency
|
dependency
.
name
==
'FlutterMacOS'
}
# [target.deployment_target] is a [String] formatted as "10.8".
deployment_target_major
,
deployment_target_minor
=
target
.
deployment_target
.
match
(
/(\d+).?(\d*)/
).
captures
...
...
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