Sha256: 23acde246985b72e7cbd7ec02cbe8134bc2d191bd03885084ca7f7eadd63d8e9
Contents?: true
Size: 1.68 KB
Versions: 1
Compression:
Stored size: 1.68 KB
Contents
module Pod class Static def self.keyword :static end end class Podfile class TargetDefinition def parse_force_static_framework(name, requirements) options = requirements.last if options.is_a?(Hash) && options[Pod::Static.keyword] != nil should_static = options.delete(Pod::Static.keyword) requirements.pop if options.empty? pod_name = Specification.root_name(name) @force_static_framework_names ||= [] @force_static_framework_names.push pod_name end end def force_static_framework_names names = @force_static_framework_names || [] if parent != nil and parent.kind_of? TargetDefinition names += parent.force_static_framework_names end names end old_method = instance_method(:parse_inhibit_warnings) define_method(:parse_inhibit_warnings) do |name, requirements| parse_force_static_framework(name, requirements) old_method.bind(self).(name, requirements) end end end class PodTarget old_method = instance_method(:initialize) define_method(:initialize) do |sandbox, host_requires_frameworks, user_build_configurations, archs, platform, specs, target_definitions, file_accessors, scope_suffix, build_type| bt = build_type[:build_type] if target_definitions.first.force_static_framework_names.include?(specs.first.name) bt = Target::BuildType.static_framework end old_method.bind(self).(sandbox, host_requires_frameworks, user_build_configurations, archs, platform, specs, target_definitions, file_accessors, scope_suffix, :build_type => bt) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cocoapods-force-static-framework-0.0.2 | lib/cocoapods-force-static-framework/command/framework.rb |