Skip linking on Flutter for CocoaPods transitive dependencies (#78592)

This commit is contained in:
Jenn Magder
2021-03-19 15:33:20 -07:00
committed by GitHub
parent 197b440e96
commit 6a4dd4cfb4
2 changed files with 44 additions and 1 deletions

View File

@@ -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