pod-builder 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c6275f3a40b0b245434453e3b7a0f65e58e67bd5014cc5e51f6bfb150293bad
4
- data.tar.gz: f521cdbb64dbce74c33ffad91b256766c770f1f42ec3a77e1cf1d07c6bdbaa5e
3
+ metadata.gz: 2543ea37db6acf1d514a3fb124d57828402cc1317b6af224021cbd051ad078e5
4
+ data.tar.gz: 15c5d80d10832f30057af56ddb76c4ae1b5d4567611e75ce06dffff76b707a5b
5
5
  SHA512:
6
- metadata.gz: df5f8f23b4d9eb6af7d9a9aed757aa0f1ea71414d0b8dcdf872f1b7bcf21d425ac48d242901d90a73a05d2a794c026613af6741f205b3ee01b47c610e7e004a0
7
- data.tar.gz: d3688d9b6fa5b0e475f0065017cfcc156e4d888c1ecd7f707c651a7623a025c58b046baae24ee41bf5e7a16e6763d7c1605f06d82eb40122fc207972d733d880
6
+ metadata.gz: 8a5f4e4949cd05a606e7c35816f4e5feb267ce35ed296c6ed6c627ec7b5ba79d912afa5c323e196d0b3306d54366e732896082909ed838e8ed60475f00fe3b04
7
+ data.tar.gz: 2dc996a6014ae9ba8f2a16ad8d1f20a049c776042c4d7bf592fe5597c7dc6a33c5c001c48e0caaabfb744f3e552fd24127c2b20cff23160aaa5f6b7d9b87378e
@@ -1,7 +1,7 @@
1
1
  require 'cfpropertylist'
2
2
 
3
-
4
- # We swizzle the analyzer to inject spec overrides
3
+ # We swizzle the analyzer to inject spec overrides. This might no longer be needed
4
+ # given that we're swizzling the Pod::Downloader as well
5
5
  class Pod::Specification::Linter::Analyzer
6
6
  alias_method :swz_analyze, :analyze
7
7
 
@@ -18,7 +18,6 @@ class Pod::Specification::Linter::Analyzer
18
18
  end
19
19
 
20
20
  Pod::Downloader.singleton_class.send(:alias_method, :swz_download, :download)
21
-
22
21
  module Pod::Downloader
23
22
  def self.download(
24
23
  request,
@@ -38,6 +37,47 @@ module Pod::Downloader
38
37
  end
39
38
  end
40
39
 
40
+ # The Pod::Target and Pod::Installer::Xcode::PodTargetDependencyInstaller swizzles patch
41
+ # the following issues:
42
+ # - https://github.com/CocoaPods/Rome/issues/81
43
+ # - https://github.com/leavez/cocoapods-binary/issues/50
44
+ begin
45
+ require 'cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb'
46
+
47
+ class Pod::Target
48
+ attr_accessor :mock_dynamic_framework
49
+
50
+ alias_method :swz_build_type, :build_type
51
+
52
+ def build_type
53
+ if mock_dynamic_framework == true
54
+ if defined?(Pod::BuildType) # CocoaPods 1.9 and later
55
+ Pod::BuildType.new(linkage: :dynamic, packaging: :framework)
56
+ elsif defined?(Pod::Target::BuildType) # CocoaPods 1.7, 1.8
57
+ Pod::Target::BuildType.new(linkage: :dynamic, packaging: :framework)
58
+ else
59
+ raise "BuildType not found. Open an issue reporting your CocoaPods version"
60
+ end
61
+ else
62
+ swz_build_type()
63
+ end
64
+ end
65
+ end
66
+
67
+ class Pod::Installer::Xcode::PodTargetDependencyInstaller
68
+ alias_method :swz_wire_resource_bundle_targets, :wire_resource_bundle_targets
69
+
70
+ def wire_resource_bundle_targets(resource_bundle_targets, native_target, pod_target)
71
+ pod_target.mock_dynamic_framework = pod_target.build_as_static_framework?
72
+ res = swz_wire_resource_bundle_targets(resource_bundle_targets, native_target, pod_target)
73
+ pod_target.mock_dynamic_framework = false
74
+ return res
75
+ end
76
+ end
77
+ rescue
78
+ # CocoaPods 1.6.2 or earlier
79
+ end
80
+
41
81
  module PodBuilder
42
82
  class Install
43
83
  def self.podfile(podfile_content, podfile_items, build_configuration)
@@ -99,6 +99,9 @@ module PodBuilder
99
99
  end
100
100
  }
101
101
  end
102
+
103
+ multiple_buildable_items = podfile_items.uniq { |t| t.root_name }
104
+ buildable_items = podfile_items.reject { |t| multiple_buildable_items.map(&:root_name).include?(t.root_name) && t.is_external == false }
102
105
 
103
106
  result_targets = analyzer.instance_variable_get("@result").targets.map(&:name)
104
107
  podfile_content = ["# Autogenerated by PodBuilder (https://github.com/Subito-it/PodBuilder)", "# Please don't modify this file", "\n"]
@@ -125,7 +128,9 @@ module PodBuilder
125
128
 
126
129
  specifications.each do |spec|
127
130
  item = podfile_items.detect { |x| x.name == spec.name }
128
- podfile_content.push("\t#{item.entry}")
131
+ if buildable_items.map(&:name).include?(spec.name)
132
+ podfile_content.push("\t#{item.entry}")
133
+ end
129
134
  end
130
135
 
131
136
  podfile_content.push("end\n")
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "1.6.0"
2
+ VERSION = "1.7.0"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-03 00:00:00.000000000 Z
11
+ date: 2020-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler