pod-builder 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -0
- data/lib/pod_builder/command/build.rb +13 -2
- data/lib/pod_builder/install.rb +5 -1
- data/lib/pod_builder/podfile.rb +5 -1
- data/lib/pod_builder/podspec.rb +9 -0
- data/lib/pod_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ceefd6bd5f43a132ff983b2b61dcbccc7eb13f851eabcb202c596e7576a24b6
|
4
|
+
data.tar.gz: 0d79a2b1a7d4e4f6ca294c75cdcea47578f36f5f5d37df8840e4fe500f49fee2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f5869951d3ce8182802e4979db221df18683cfc03f59fd129eb82d93db84553400c34aa606f5a35416758228c8ece7bd7bec7cea63333a7fdc405dda2b145c7
|
7
|
+
data.tar.gz: a0cb6040873ac85fed54eb09081db9c78bb3133702fff78ad93e7395149a2f2216f2921d6f0559c6066ee200c19017ea17805071ba2c44a2226fa56fbbfbfe4e
|
data/README.md
CHANGED
@@ -279,6 +279,21 @@ PodBuilder leverages CocoaPods code and [cocoapods-rome plugin](https://github.c
|
|
279
279
|
|
280
280
|
# FAQ
|
281
281
|
|
282
|
+
### **I get an _'`Alamofire` does not specify a Swift version and none of the targets (`DummyTarget`)'_ when building**
|
283
|
+
|
284
|
+
The podspec of the Pod you're trying to build doesn't specify the swift_version which is required in recent versions of CocoaPods. Either contact the author/mantainer of the Pod asking it to fix the podspec or add a `spec_overrides` in _PodBuilder.json_.
|
285
|
+
|
286
|
+
```json
|
287
|
+
"spec_overrides": {
|
288
|
+
"Google-Mobile-Ads-SDK": {
|
289
|
+
"module_name": "GoogleMobileAds"
|
290
|
+
},
|
291
|
+
"Swifter": {
|
292
|
+
"swift_version": "5.0"
|
293
|
+
}
|
294
|
+
}
|
295
|
+
```
|
296
|
+
|
282
297
|
### **After prebuilding my project no longer compiles**
|
283
298
|
|
284
299
|
A common problem you may encounter is with Objective-C imports. You should verify that you're properly importing all the headers of your pods with the angle bracket notation `#import <FrameworkName/HeaderFile.h>` instead of directly importing `#import "HeaderFile.h"`.
|
@@ -293,10 +308,12 @@ How to proceed in these cases?
|
|
293
308
|
|
294
309
|
Relaunch the build command passing `-d`, this won't delete the temporary _/tmp/pod_builder_ folder on failure. Open _/tmp/pod_builder/Pods/Pods.xcproject_, make the Pods-DummyTarget target visible by clicking on _Show_ under _Product->Scheme->Manage shemes..._ and build from within Xcode. This will help you understand what went wrong. Remeber to verify that you're building the _Release_ build configuration.
|
295
310
|
|
311
|
+
|
296
312
|
### **Do I need to commit compiled frameworks?**
|
297
313
|
|
298
314
|
No. If the size of compiled frameworks in your repo is a concern (and for whatever reason you can't use [Git-LFS](#git-lfs)) you can choose add the _Rome_ and _dSYM_ folder to .gitignore and run `pod_builder update` to rebuild all frameworks that need to be recompiled.
|
299
315
|
|
316
|
+
|
300
317
|
### **I get an _'attempt to read non existent folder `/private/tmp/pod_builder/Pods/ podname'_ when building**
|
301
318
|
|
302
319
|
Please open an issue here. You may also add the name of the pod to the [`skip_pods`](#skip_pods) key in the configuration file and try rebuilding again.
|
@@ -82,7 +82,7 @@ module PodBuilder
|
|
82
82
|
FileUtils.rm_f(PodBuilder::basepath("Podfile.lock"))
|
83
83
|
end
|
84
84
|
|
85
|
-
|
85
|
+
clean_frameworks_folder(all_buildable_items)
|
86
86
|
|
87
87
|
Licenses::write(licenses, all_buildable_items)
|
88
88
|
|
@@ -297,7 +297,9 @@ module PodBuilder
|
|
297
297
|
return pods_to_build
|
298
298
|
end
|
299
299
|
|
300
|
-
def self.
|
300
|
+
def self.clean_frameworks_folder(buildable_items)
|
301
|
+
puts "Cleaning framework folder".yellow
|
302
|
+
|
301
303
|
expected_frameworks = buildable_items.map { |x| "#{x.module_name}.framework" }
|
302
304
|
expected_frameworks += buildable_items.map { |x| x.vendored_items }.flatten.map { |x| x.split("/").last }
|
303
305
|
expected_frameworks.uniq!
|
@@ -311,6 +313,15 @@ module PodBuilder
|
|
311
313
|
FileUtils.rm_rf(existing_framework)
|
312
314
|
end
|
313
315
|
end
|
316
|
+
|
317
|
+
existing_dsyms = Dir.glob("#{PodBuilder::basepath("dSYM")}/**/*.dSYM")
|
318
|
+
existing_dsyms.each do |existing_dsym|
|
319
|
+
existing_dsym_name = File.basename(existing_dsym)
|
320
|
+
if !expected_frameworks.include?(existing_dsym_name.gsub(".dSYM", ""))
|
321
|
+
puts "Cleanining up `#{existing_dsym_name}`, no longer found among dependencies".blue
|
322
|
+
FileUtils.rm_rf(existing_dsym)
|
323
|
+
end
|
324
|
+
end
|
314
325
|
end
|
315
326
|
end
|
316
327
|
end
|
data/lib/pod_builder/install.rb
CHANGED
@@ -141,6 +141,10 @@ module PodBuilder
|
|
141
141
|
# making it impossible to determine the associated Pods when building multiple pods at once
|
142
142
|
search_base = "#{Configuration.build_path}/Pods/"
|
143
143
|
podfile_items.each do |podfile_item|
|
144
|
+
if podfile_item.vendored_framework_path.nil?
|
145
|
+
next
|
146
|
+
end
|
147
|
+
|
144
148
|
podfile_item.vendored_items.each do |vendored_item|
|
145
149
|
unless vendored_item.end_with?(".a")
|
146
150
|
next
|
@@ -156,7 +160,7 @@ module PodBuilder
|
|
156
160
|
|
157
161
|
destination_path = PodBuilder::basepath("Rome/#{library_rel_path}/#{result_path}")
|
158
162
|
FileUtils.mkdir_p(File.dirname(destination_path))
|
159
|
-
FileUtils.cp_r(library_path, destination_path)
|
163
|
+
FileUtils.cp_r(library_path, destination_path, :remove_destination => true)
|
160
164
|
end
|
161
165
|
end
|
162
166
|
end
|
data/lib/pod_builder/podfile.rb
CHANGED
@@ -158,7 +158,11 @@ module PodBuilder
|
|
158
158
|
marker = podfile_item.prebuilt_marker()
|
159
159
|
|
160
160
|
podfile_item_dependency_items = all_buildable_items.select { |x| podfile_item.dependency_names.include?(x.name) && x.vendored_framework_path.nil? == false }
|
161
|
-
|
161
|
+
if podfile_item_dependency_items.count > 0
|
162
|
+
prebuilt_lines += podfile_item_dependency_items.map { |x| "#{line.detect_indentation}#{x.prebuilt_entry(include_pb_entry = false)}#{marker}\n" }.uniq
|
163
|
+
else
|
164
|
+
prebuilt_lines.push(line)
|
165
|
+
end
|
162
166
|
else
|
163
167
|
prebuilt_lines.push("#{line.detect_indentation}#{podfile_item.prebuilt_entry}\n")
|
164
168
|
end
|
data/lib/pod_builder/podspec.rb
CHANGED
@@ -11,6 +11,7 @@ module PodBuilder
|
|
11
11
|
attr_accessor :resources
|
12
12
|
attr_accessor :exclude_files
|
13
13
|
attr_accessor :xcconfig
|
14
|
+
attr_accessor :dependencies
|
14
15
|
|
15
16
|
def initialize
|
16
17
|
@name = ""
|
@@ -23,6 +24,7 @@ module PodBuilder
|
|
23
24
|
@resources = []
|
24
25
|
@exclude_files = []
|
25
26
|
@xcconfig = {}
|
27
|
+
@dependencies = []
|
26
28
|
end
|
27
29
|
|
28
30
|
def to_s
|
@@ -68,6 +70,8 @@ module PodBuilder
|
|
68
70
|
vendored_frameworks += item.vendored_items.map { |x| File.basename(x) }.select { |x| File.exist?(PodBuilder::basepath(PodfileItem::vendored_name_framework_path(x))) }.map { |x| "Rome/#{x}" }
|
69
71
|
vendored_frameworks.uniq!
|
70
72
|
vendored_libraries = Dir.glob(PodBuilder::basepath("Rome/#{item.module_name}/**/*.a")).map { |x| x.to_s.gsub(PodBuilder::basepath, "")[1..-1] }
|
73
|
+
|
74
|
+
non_prebuilt_dependencies = item.dependencies.select { |x| x.vendored_framework_path.nil? }
|
71
75
|
|
72
76
|
podspec = " s.subspec '#{item.name.gsub("/", "_")}' do |p|\n"
|
73
77
|
|
@@ -92,6 +96,9 @@ module PodBuilder
|
|
92
96
|
if item.xcconfig.keys.count > 0
|
93
97
|
podspec += " p.xcconfig = #{item.xcconfig.to_s}\n"
|
94
98
|
end
|
99
|
+
non_prebuilt_dependencies.each do |non_prebuilt_dependency|
|
100
|
+
podspec += " p.dependency '#{non_prebuilt_dependency.name}'\n"
|
101
|
+
end
|
95
102
|
|
96
103
|
podspec += " end"
|
97
104
|
|
@@ -160,6 +167,8 @@ module PodBuilder
|
|
160
167
|
podspec_item.xcconfig[k] = v
|
161
168
|
end
|
162
169
|
end
|
170
|
+
|
171
|
+
podspec_item.dependencies = buildable_items.select { |x| pod.dependency_names.include?(x.name) }
|
163
172
|
end
|
164
173
|
|
165
174
|
return podspec_items
|
data/lib/pod_builder/version.rb
CHANGED