pod-builder 0.3.3 → 0.3.4
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 +4 -4
- data/.gitignore +1 -0
- data/README.md +7 -2
- data/exe/pod_builder +32 -2
- data/lib/pod_builder/command/build.rb +54 -14
- data/lib/pod_builder/command/update.rb +80 -0
- data/lib/pod_builder/command.rb +1 -0
- data/lib/pod_builder/configuration.rb +2 -0
- data/lib/pod_builder/core.rb +4 -0
- data/lib/pod_builder/install.rb +27 -1
- data/lib/pod_builder/podfile_item.rb +16 -6
- data/lib/pod_builder/podspec.rb +1 -0
- data/lib/pod_builder/version.rb +1 -1
- data/pod-builder.gemspec +0 -1
- metadata +3 -3
- data/.vscode/launch.json +0 -172
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2b15a3539bfaa5271eb74891d1bed4036fd42a599470dbcf938858ad10b08a3
|
|
4
|
+
data.tar.gz: fef9f31b21b1830cd4042484d7327e599229d4090fa96d967265124e709d0046
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c4ad04ab32b1193a2050b257eb7cc2f22633f93c09cc793c214b23243337d637020237739ce28c76e1234844f93021990ff0637eb9443a6492647fed76e1d75a
|
|
7
|
+
data.tar.gz: d46e70d979b2b0b2ee837d2e6f4548f1051666f9f052c5e6206dde72a15c7db81ae49adc5bfeafcc9d26985e916112ab3bfa6ba53070cbe1894d98596368f39c
|
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# What is PodBuilder
|
|
2
2
|
|
|
3
|
-
PodBuilder is a complementary tool to [CocoaPods](https://github.com/CocoaPods/CocoaPods) that allows to prebuild pods into frameworks which can then be included into a project’s repo. Instead of committing pod’s source code you add its compiled counterpart. While there is a size penalty in doing so
|
|
3
|
+
PodBuilder is a complementary tool to [CocoaPods](https://github.com/CocoaPods/CocoaPods) that allows to prebuild pods into frameworks which can then be included into a project’s repo. Instead of committing pod’s source code you add its compiled counterpart. While there is a size penalty in doing so compilation times will decrease significantly because pod's source files no longer need to be recompiled _very often_ and there's also a lot less for SourceKit to index. Additionally frameworks contain all architecture so they’re ready to be used both on any device and simulator.
|
|
4
4
|
|
|
5
5
|
Depending on the size of the project and number of pods this can translate in a significant reduction of compilation times (for a large project we designed this tool for we saw a 50% faster compile times, but YMMV).
|
|
6
6
|
|
|
@@ -43,6 +43,7 @@ Podbuilder comes with a set of commands:
|
|
|
43
43
|
- `deintegrate`: deintegrates PodBuilder's initialization
|
|
44
44
|
- `build`: prebuilts a specific pod declared in the PodBuilder-Podfile
|
|
45
45
|
- `build_all`: prebuilts all pods declared in the PodBuilder-Podfile
|
|
46
|
+
- `update`: prebuilts all pods that are out-of-sync with the Restore-Podfile
|
|
46
47
|
- `restore_all`: rebuilts all pods declared in the Restore-Podfile file
|
|
47
48
|
- `install_sources`: installs sources of pods to debug into prebuild frameworks
|
|
48
49
|
- `switch`: switch between prebuilt, development or standard pod in the Application-Podfile
|
|
@@ -82,6 +83,10 @@ The following will happen:
|
|
|
82
83
|
|
|
83
84
|
As `build` but will prebuild all pods defined in PodBuilder-Podfile.
|
|
84
85
|
|
|
86
|
+
#### `update` command
|
|
87
|
+
|
|
88
|
+
If you decide not to commit the _Rome_ and _dSYM_ folders you can use this command to rebuild all those frameworks that are out-of-sync with the Restore-Podfile or that were built with a different version of the Swift compiler.
|
|
89
|
+
|
|
85
90
|
#### `restore_all` command
|
|
86
91
|
|
|
87
92
|
Will recompile all pods to the versions defined in the Restore-Podfile. You would typically use this when checking out an older revision of your project that might need to rebuild frameworks (e.g. You're using a different version of the Swift compiler) to the exact same version at the time of the commit.
|
|
@@ -251,7 +256,7 @@ Relaunch the build command passing `-d`, this won't delete the temporary _/tmp/p
|
|
|
251
256
|
|
|
252
257
|
### **Do I need to commit compiled frameworks?**
|
|
253
258
|
|
|
254
|
-
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
|
|
259
|
+
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.
|
|
255
260
|
|
|
256
261
|
### **I get an _'attempt to read non existent folder `/private/tmp/pod_builder/Pods/ podname'_ when building**
|
|
257
262
|
|
data/exe/pod_builder
CHANGED
|
@@ -29,11 +29,12 @@ Command:
|
|
|
29
29
|
+ deintegrate Deintegrate prebuild folders
|
|
30
30
|
+ build Build a specific pod declared in the PodBuilder-Podfile
|
|
31
31
|
+ build_all Build all pods declared in the PodBuilder-Podfile
|
|
32
|
+
+ update Rebuild frameworks that are outdated
|
|
32
33
|
+ restore_all Rebuild all pods declared in the Restore-Podfile
|
|
33
34
|
+ install_sources Install sources of pods to debug into prebuild frameworks
|
|
34
35
|
+ switch Switch between prebuilt/development/standard pod in the Application-Podfile
|
|
35
|
-
+ clean Remove prebuild frameworks, dSYMs and source files added by install_sources no longer in
|
|
36
|
-
+ sync_podfile
|
|
36
|
+
+ clean Remove prebuild frameworks, dSYMs and source files added by `install_sources` command that are no longer in the PodBuilder-Podfile
|
|
37
|
+
+ sync_podfile Update your Application-Podfile with all pods declared in the PodBuilder-Podfile
|
|
37
38
|
|
|
38
39
|
Options:
|
|
39
40
|
"
|
|
@@ -63,6 +64,9 @@ Options:
|
|
|
63
64
|
opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
|
|
64
65
|
OPTIONS[:allow_warnings] = o
|
|
65
66
|
end
|
|
67
|
+
opts.on("-a", "--auto-resolve-deps", "Resolve pod dependencies automatically") do |o|
|
|
68
|
+
OPTIONS[:auto_resolve_dependencies] = o
|
|
69
|
+
end
|
|
66
70
|
opts.on("-d", "--debug", "Don't clean build folder") do |o|
|
|
67
71
|
OPTIONS[:debug] = o
|
|
68
72
|
end
|
|
@@ -98,6 +102,32 @@ Options:
|
|
|
98
102
|
]
|
|
99
103
|
},
|
|
100
104
|
|
|
105
|
+
"update" => {
|
|
106
|
+
:opts => OptionParser.new do |opts|
|
|
107
|
+
opts.banner = "
|
|
108
|
+
Usage:
|
|
109
|
+
|
|
110
|
+
$ pod_builder update [OPTIONS]
|
|
111
|
+
|
|
112
|
+
Rebuild frameworks that are outdated
|
|
113
|
+
|
|
114
|
+
Options:
|
|
115
|
+
"
|
|
116
|
+
opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
|
|
117
|
+
OPTIONS[:update_repos] = false
|
|
118
|
+
end
|
|
119
|
+
opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
|
|
120
|
+
OPTIONS[:allow_warnings] = o
|
|
121
|
+
end
|
|
122
|
+
opts.on("-d", "--debug", "Don't clean build folder") do |o|
|
|
123
|
+
OPTIONS[:debug] = o
|
|
124
|
+
end
|
|
125
|
+
end,
|
|
126
|
+
:call => [
|
|
127
|
+
PodBuilder::Command::Update
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
|
|
101
131
|
"restore_all" => {
|
|
102
132
|
:opts => OptionParser.new do |opts|
|
|
103
133
|
opts.banner = "
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
require 'pod_builder/core'
|
|
2
|
-
require 'cfpropertylist'
|
|
3
2
|
|
|
4
3
|
module PodBuilder
|
|
5
4
|
module Command
|
|
@@ -28,8 +27,11 @@ module PodBuilder
|
|
|
28
27
|
argument_pods = buildable_items.map(&:root_name)
|
|
29
28
|
end
|
|
30
29
|
|
|
31
|
-
argument_pods.select
|
|
32
|
-
argument_pods.
|
|
30
|
+
available_argument_pods = argument_pods.select { |x| all_buildable_items.map(&:root_name).include?(x) }
|
|
31
|
+
(argument_pods - available_argument_pods).each { |x|
|
|
32
|
+
puts "'#{x}' not found, skipping".magenta
|
|
33
|
+
}
|
|
34
|
+
argument_pods = available_argument_pods.uniq
|
|
33
35
|
|
|
34
36
|
prebuilt_pods_to_install = prebuilt_items.select { |x| argument_pods.include?(x.root_name) }
|
|
35
37
|
|
|
@@ -40,14 +42,9 @@ module PodBuilder
|
|
|
40
42
|
check_splitted_subspecs_are_static(all_buildable_items, options)
|
|
41
43
|
check_pods_exists(argument_pods, all_buildable_items)
|
|
42
44
|
|
|
43
|
-
pods_to_build = buildable_items
|
|
44
|
-
pods_to_build += other_subspecs(pods_to_build, buildable_items)
|
|
45
|
-
|
|
45
|
+
pods_to_build = resolve_pods_to_build(argument_pods, buildable_items, options)
|
|
46
46
|
buildable_items -= pods_to_build
|
|
47
47
|
|
|
48
|
-
check_no_common_dependencies(pods_to_build, buildable_items)
|
|
49
|
-
check_not_building_dependency(pods_to_build, buildable_items)
|
|
50
|
-
|
|
51
48
|
# Remove dependencies from pods to build
|
|
52
49
|
all_dependencies_name = pods_to_build.map(&:dependency_names).flatten.uniq
|
|
53
50
|
pods_to_build.select! { |x| !all_dependencies_name.include?(x.name) }
|
|
@@ -134,7 +131,10 @@ module PodBuilder
|
|
|
134
131
|
return pods
|
|
135
132
|
end
|
|
136
133
|
|
|
137
|
-
def self.
|
|
134
|
+
def self.expected_common_dependencies(pods_to_build, buildable_items)
|
|
135
|
+
expected_pod_list = []
|
|
136
|
+
errors = []
|
|
137
|
+
|
|
138
138
|
pods_to_build.each do |pod_to_build|
|
|
139
139
|
pod_to_build.dependency_names.each do |dependency|
|
|
140
140
|
buildable_items.each do |buildable_pod|
|
|
@@ -143,22 +143,34 @@ module PodBuilder
|
|
|
143
143
|
end
|
|
144
144
|
|
|
145
145
|
if buildable_pod.dependency_names.include?(dependency) && !buildable_pod.has_subspec(dependency) && !buildable_pod.has_common_spec(dependency) then
|
|
146
|
-
expected_pod_list
|
|
147
|
-
|
|
146
|
+
expected_pod_list += pods_to_build.map(&:root_name) + [buildable_pod.root_name]
|
|
147
|
+
expected_pod_list.uniq!
|
|
148
|
+
errors.push("Can't build #{pod_to_build.name} because it has common dependencies (#{dependency}) with #{buildable_pod.name}.\n\nUse `pod_builder build #{expected_pod_list.join(" ")}` instead\n\n")
|
|
149
|
+
errors.uniq!
|
|
148
150
|
end
|
|
149
151
|
end
|
|
150
152
|
end
|
|
151
153
|
end
|
|
154
|
+
|
|
155
|
+
return expected_pod_list, errors
|
|
152
156
|
end
|
|
153
157
|
|
|
154
|
-
def self.
|
|
158
|
+
def self.expected_parent_dependencies(pods_to_build, buildable_items)
|
|
159
|
+
expected_pod_list = []
|
|
160
|
+
errors = []
|
|
161
|
+
|
|
155
162
|
buildable_items_dependencies = buildable_items.map(&:dependency_names).flatten.uniq
|
|
156
163
|
pods_to_build.each do |pod_to_build|
|
|
157
164
|
if buildable_items_dependencies.include?(pod_to_build.name)
|
|
158
165
|
parent = buildable_items.detect { |x| x.dependency_names.include?(pod_to_build.name) }
|
|
159
|
-
|
|
166
|
+
|
|
167
|
+
expected_pod_list += (pods_to_build + [parent]).map(&:root_name)
|
|
168
|
+
expected_pod_list.uniq!
|
|
169
|
+
errors.push("Can't build #{pod_to_build.name} because it is a dependency of #{parent.name}.\n\nUse `pod_builder build #{expected_pod_list.join(" ")}` instead\n\n")
|
|
160
170
|
end
|
|
161
171
|
end
|
|
172
|
+
|
|
173
|
+
return expected_pod_list, errors
|
|
162
174
|
end
|
|
163
175
|
|
|
164
176
|
def self.check_not_building_subspecs(pods_to_build)
|
|
@@ -234,6 +246,34 @@ module PodBuilder
|
|
|
234
246
|
end
|
|
235
247
|
end
|
|
236
248
|
end
|
|
249
|
+
|
|
250
|
+
def self.resolve_pods_to_build(argument_pods, buildable_items, options)
|
|
251
|
+
pods_to_build = []
|
|
252
|
+
|
|
253
|
+
fns = [method(:expected_common_dependencies), method(:expected_parent_dependencies)]
|
|
254
|
+
fns.each do |fn|
|
|
255
|
+
loop do
|
|
256
|
+
pods_to_build = buildable_items.select { |x| argument_pods.include?(x.root_name) }
|
|
257
|
+
pods_to_build += other_subspecs(pods_to_build, buildable_items)
|
|
258
|
+
tmp_buildable_items = buildable_items - pods_to_build
|
|
259
|
+
|
|
260
|
+
expected_pods, errors = fn.call(pods_to_build, tmp_buildable_items)
|
|
261
|
+
if expected_pods.count > 0
|
|
262
|
+
if !options.has_key?(:auto_resolve_dependencies) && expected_pods.count > 0
|
|
263
|
+
raise "\n\n#{errors.join("\n")}".red
|
|
264
|
+
else
|
|
265
|
+
argument_pods = expected_pods.uniq
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
if !options.has_key?(:auto_resolve_dependencies) || expected_pods.count == 0
|
|
270
|
+
break
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
return pods_to_build
|
|
276
|
+
end
|
|
237
277
|
end
|
|
238
278
|
end
|
|
239
279
|
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
require 'pod_builder/core'
|
|
2
|
+
require 'cfpropertylist'
|
|
3
|
+
|
|
4
|
+
module PodBuilder
|
|
5
|
+
module Command
|
|
6
|
+
class Update
|
|
7
|
+
def self.call(options)
|
|
8
|
+
Configuration.check_inited
|
|
9
|
+
PodBuilder::prepare_basepath
|
|
10
|
+
|
|
11
|
+
podfile_path = PodBuilder::basepath("Podfile.restore")
|
|
12
|
+
podfile_content = File.read(podfile_path)
|
|
13
|
+
|
|
14
|
+
pod_entries = []
|
|
15
|
+
podfile_content.each_line do |line|
|
|
16
|
+
if pod_entry = pod_entry_in(line)
|
|
17
|
+
if line.match(/(pb<)(.*?)(>)/) # is not prebuilt
|
|
18
|
+
pod_entries.push(pod_entry)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
pod_entries.uniq!
|
|
24
|
+
|
|
25
|
+
Dir.glob(PodBuilder::basepath("Rome/**/*.framework")) do |framework_path|
|
|
26
|
+
framework_name = File.basename(framework_path)
|
|
27
|
+
plist_filename = File.join(framework_path, Configuration.framework_plist_filename)
|
|
28
|
+
unless File.exist?(plist_filename)
|
|
29
|
+
raise "Unable to extract item info for framework #{framework_name}. Please rebuild the framework manually!\n".red
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
plist = CFPropertyList::List.new(:file => plist_filename)
|
|
33
|
+
data = CFPropertyList.native_types(plist.value)
|
|
34
|
+
|
|
35
|
+
matches = data['entry'].gsub(" ", "").match(/(^pod')(.*?)(')(.*)/)
|
|
36
|
+
raise "Unexpected error\n".red if matches&.size != 5
|
|
37
|
+
delete_regex = matches[1] + matches[2].split("/").first + matches[3]
|
|
38
|
+
|
|
39
|
+
if data['is_prebuilt'] == false
|
|
40
|
+
delete_regex += matches[4]
|
|
41
|
+
end
|
|
42
|
+
if (swift_version = data['swift_version']) && swift_version != PodBuilder::system_swift_version
|
|
43
|
+
next
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
pod_entries.select! { |x| x.match(delete_regex) == nil }
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
unless pod_entries.count > 0
|
|
50
|
+
puts "Frameworks in sync!\n".green
|
|
51
|
+
return true
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
ARGV.clear
|
|
55
|
+
pod_entries.each { |x|
|
|
56
|
+
matches = x.match(/(^pod')(.*?)(')/)
|
|
57
|
+
raise "Unexpected error\n".red if matches&.size != 4
|
|
58
|
+
ARGV << matches[2]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
options[:auto_resolve_dependencies] = true
|
|
62
|
+
PodBuilder::Command::Build.call(options)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
private
|
|
66
|
+
|
|
67
|
+
def self.pod_entry_in(line)
|
|
68
|
+
stripped_line = line.gsub("\"", "'").gsub(" ", "").gsub("\t", "").gsub("\n", "")
|
|
69
|
+
matches = stripped_line.match(/(^pod')(.*?)(')(.*)/)
|
|
70
|
+
|
|
71
|
+
if matches&.size == 5
|
|
72
|
+
entry = matches[1] + matches[2].split("/").first + matches[3] + matches[4]
|
|
73
|
+
return entry.split("#pb<").first
|
|
74
|
+
else
|
|
75
|
+
return nil
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
data/lib/pod_builder/command.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require 'pod_builder/command/none'
|
|
2
2
|
require 'pod_builder/command/build'
|
|
3
3
|
require 'pod_builder/command/build_all'
|
|
4
|
+
require 'pod_builder/command/update'
|
|
4
5
|
require 'pod_builder/command/restore_all'
|
|
5
6
|
require 'pod_builder/command/init'
|
|
6
7
|
require 'pod_builder/command/clean'
|
|
@@ -40,6 +40,7 @@ module PodBuilder
|
|
|
40
40
|
attr_accessor :lfs_include_pods_folder
|
|
41
41
|
attr_accessor :project_name
|
|
42
42
|
attr_accessor :restore_enabled
|
|
43
|
+
attr_accessor :framework_plist_filename
|
|
43
44
|
end
|
|
44
45
|
|
|
45
46
|
@build_settings = DEFAULT_BUILD_SETTINGS
|
|
@@ -60,6 +61,7 @@ module PodBuilder
|
|
|
60
61
|
@lfs_include_pods_folder = false
|
|
61
62
|
@project_name = ""
|
|
62
63
|
@restore_enabled = true
|
|
64
|
+
@framework_plist_filename = "PodBuilder.plist"
|
|
63
65
|
|
|
64
66
|
def self.check_inited
|
|
65
67
|
raise "\n\nNot inited, run `pod_builder init`\n".red if podbuilder_path.nil?
|
data/lib/pod_builder/core.rb
CHANGED
data/lib/pod_builder/install.rb
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require 'cfpropertylist'
|
|
1
2
|
|
|
2
3
|
module PodBuilder
|
|
3
4
|
class Install
|
|
@@ -17,7 +18,8 @@ module PodBuilder
|
|
|
17
18
|
FileUtils.touch(lock_file)
|
|
18
19
|
|
|
19
20
|
install
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
add_framework_plist_info(podfile_items)
|
|
21
23
|
cleanup_frameworks(podfile_items)
|
|
22
24
|
copy_frameworks(podfile_items)
|
|
23
25
|
if build_configuration != "debug"
|
|
@@ -58,6 +60,30 @@ module PodBuilder
|
|
|
58
60
|
end
|
|
59
61
|
end
|
|
60
62
|
|
|
63
|
+
def self.add_framework_plist_info(podfile_items)
|
|
64
|
+
swift_version = PodBuilder::system_swift_version
|
|
65
|
+
Dir.glob("#{Configuration.build_path}/Rome/*.framework") do |framework_path|
|
|
66
|
+
filename = File.basename(framework_path, ".*")
|
|
67
|
+
if podfile_item = podfile_items.detect { |x| x.module_name == filename }
|
|
68
|
+
podbuilder_file = File.join(framework_path, Configuration.framework_plist_filename)
|
|
69
|
+
entry = podfile_item.entry(true, false)
|
|
70
|
+
|
|
71
|
+
plist = CFPropertyList::List.new
|
|
72
|
+
plist_data = {}
|
|
73
|
+
plist_data['entry'] = entry
|
|
74
|
+
plist_data['is_prebuilt'] = podfile_item.is_prebuilt
|
|
75
|
+
if Dir.glob(File.join(framework_path, "Headers/*-Swift.h")).count > 0
|
|
76
|
+
plist_data['swift_version'] = swift_version
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
plist.value = CFPropertyList.guess(plist_data)
|
|
80
|
+
plist.save(podbuilder_file, CFPropertyList::List::FORMAT_BINARY)
|
|
81
|
+
else
|
|
82
|
+
raise "Unable to detect item for framework #{filename}.framework. Please open a bug report!"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
61
87
|
def self.cleanup_frameworks(podfile_items)
|
|
62
88
|
Dir.glob("#{Configuration.build_path}/Rome/*.framework") do |framework_path|
|
|
63
89
|
framework_rel_path = framework_rel_path(framework_path, podfile_items)
|
|
@@ -152,10 +152,7 @@ module PodBuilder
|
|
|
152
152
|
@is_static = spec.root.attributes_hash["static_framework"] || false
|
|
153
153
|
@xcconfig = spec.root.attributes_hash["xcconfig"] || {}
|
|
154
154
|
|
|
155
|
-
@source_files = spec
|
|
156
|
-
if @source_files.is_a? String
|
|
157
|
-
@source_files = @source_files.split(",")
|
|
158
|
-
end
|
|
155
|
+
@source_files = source_files_from(spec)
|
|
159
156
|
|
|
160
157
|
@build_configuration = spec.root.attributes_hash.dig("pod_target_xcconfig", "prebuild_configuration") || "release"
|
|
161
158
|
@build_configuration.downcase!
|
|
@@ -267,7 +264,7 @@ module PodBuilder
|
|
|
267
264
|
e += ", '=#{@version}'"
|
|
268
265
|
end
|
|
269
266
|
|
|
270
|
-
if include_pb_entry
|
|
267
|
+
if include_pb_entry && !is_prebuilt
|
|
271
268
|
e += " # pb<#{name}>"
|
|
272
269
|
end
|
|
273
270
|
|
|
@@ -294,7 +291,7 @@ module PodBuilder
|
|
|
294
291
|
entry = "pod 'PodBuilder/#{root_name}', :path => '#{relative_path}'"
|
|
295
292
|
end
|
|
296
293
|
|
|
297
|
-
if include_pb_entry
|
|
294
|
+
if include_pb_entry && !is_prebuilt
|
|
298
295
|
entry += " # pb<#{name}>"
|
|
299
296
|
end
|
|
300
297
|
|
|
@@ -368,5 +365,18 @@ module PodBuilder
|
|
|
368
365
|
|
|
369
366
|
return element
|
|
370
367
|
end
|
|
368
|
+
|
|
369
|
+
def source_files_from(spec)
|
|
370
|
+
root_source_files = spec.root.attributes_hash.fetch("source_files", [])
|
|
371
|
+
if root_source_files.is_a? String
|
|
372
|
+
root_source_files = root_source_files.split(",")
|
|
373
|
+
end
|
|
374
|
+
source_files = spec.attributes_hash.fetch("source_files", [])
|
|
375
|
+
if source_files.is_a? String
|
|
376
|
+
source_files = source_files.split(",")
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
return source_files + root_source_files
|
|
380
|
+
end
|
|
371
381
|
end
|
|
372
382
|
end
|
data/lib/pod_builder/podspec.rb
CHANGED
|
@@ -129,6 +129,7 @@ module PodBuilder
|
|
|
129
129
|
|
|
130
130
|
podspec_item.resources = static_vendored_frameworks.map { |x| "#{vendored_framework_path(x)}/*.{nib,bundle,xcasset,strings,png,jpg,tif,tiff,otf,ttf,ttc,plist,json,caf,wav,p12,momd}" }.flatten.uniq
|
|
131
131
|
podspec_item.exclude_files = static_vendored_frameworks.map { |x| "#{vendored_framework_path(x)}/Info.plist" }.flatten.uniq
|
|
132
|
+
podspec_item.exclude_files += podspec_item.vendored_frameworks.map { |x| "#{vendored_framework_path(x)}/#{Configuration.framework_plist_filename}" }.flatten.uniq.sort
|
|
132
133
|
|
|
133
134
|
# Merge xcconfigs
|
|
134
135
|
if !pod.xcconfig.empty?
|
data/lib/pod_builder/version.rb
CHANGED
data/pod-builder.gemspec
CHANGED
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: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tomas Camin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-12-
|
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -173,7 +173,6 @@ extensions: []
|
|
|
173
173
|
extra_rdoc_files: []
|
|
174
174
|
files:
|
|
175
175
|
- ".gitignore"
|
|
176
|
-
- ".vscode/launch.json"
|
|
177
176
|
- Example/Frameworks/PodBuilder.json
|
|
178
177
|
- Example/PodBuilderExample.xcodeproj/project.pbxproj
|
|
179
178
|
- Example/PodBuilderExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|
|
@@ -253,6 +252,7 @@ files:
|
|
|
253
252
|
- lib/pod_builder/command/restore_all.rb
|
|
254
253
|
- lib/pod_builder/command/switch.rb
|
|
255
254
|
- lib/pod_builder/command/sync_podfile.rb
|
|
255
|
+
- lib/pod_builder/command/update.rb
|
|
256
256
|
- lib/pod_builder/configuration.rb
|
|
257
257
|
- lib/pod_builder/core.rb
|
|
258
258
|
- lib/pod_builder/install.rb
|
data/.vscode/launch.json
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "No Command",
|
|
9
|
-
"type": "Ruby",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"cwd": "/Users/tomas/Documents/Development/willhaben-ios/willhaben",
|
|
12
|
-
"useBundler": true,
|
|
13
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
14
|
-
"showDebuggerOutput": true,
|
|
15
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
16
|
-
"args": [
|
|
17
|
-
"-v"
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "Init",
|
|
22
|
-
"type": "Ruby",
|
|
23
|
-
"request": "launch",
|
|
24
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
25
|
-
"useBundler": true,
|
|
26
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
27
|
-
"showDebuggerOutput": true,
|
|
28
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
29
|
-
"args": [
|
|
30
|
-
"init"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "Deintegrate",
|
|
35
|
-
"type": "Ruby",
|
|
36
|
-
"request": "launch",
|
|
37
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
38
|
-
"useBundler": true,
|
|
39
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
40
|
-
"showDebuggerOutput": true,
|
|
41
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
42
|
-
"args": [
|
|
43
|
-
"deintegrate"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"name": "Build",
|
|
48
|
-
"type": "Ruby",
|
|
49
|
-
"request": "launch",
|
|
50
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
51
|
-
"useBundler": true,
|
|
52
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
53
|
-
"showDebuggerOutput": true,
|
|
54
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
55
|
-
"args": [
|
|
56
|
-
"build",
|
|
57
|
-
"-d",
|
|
58
|
-
"DynamicFormKit",
|
|
59
|
-
"Gallery"
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "Build All",
|
|
64
|
-
"type": "Ruby",
|
|
65
|
-
"request": "launch",
|
|
66
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
67
|
-
"useBundler": true,
|
|
68
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
69
|
-
"showDebuggerOutput": true,
|
|
70
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
71
|
-
"args": [
|
|
72
|
-
"build_all",
|
|
73
|
-
"-d",
|
|
74
|
-
"--allow-warnings"
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "Restore All",
|
|
79
|
-
"type": "Ruby",
|
|
80
|
-
"request": "launch",
|
|
81
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
82
|
-
"useBundler": true,
|
|
83
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
84
|
-
"showDebuggerOutput": true,
|
|
85
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
86
|
-
"args": [
|
|
87
|
-
"restore_all",
|
|
88
|
-
"-d"
|
|
89
|
-
]
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"name": "Clean",
|
|
93
|
-
"type": "Ruby",
|
|
94
|
-
"request": "launch",
|
|
95
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
96
|
-
"useBundler": true,
|
|
97
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
98
|
-
"showDebuggerOutput": true,
|
|
99
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
100
|
-
"args": [
|
|
101
|
-
"clean"
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"name": "Install sources",
|
|
106
|
-
"type": "Ruby",
|
|
107
|
-
"request": "launch",
|
|
108
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
109
|
-
"useBundler": true,
|
|
110
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
111
|
-
"showDebuggerOutput": true,
|
|
112
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
113
|
-
"args": [
|
|
114
|
-
"install_sources"
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"name": "Generate podspec",
|
|
119
|
-
"type": "Ruby",
|
|
120
|
-
"request": "launch",
|
|
121
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
122
|
-
"useBundler": true,
|
|
123
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
124
|
-
"showDebuggerOutput": true,
|
|
125
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
126
|
-
"args": [
|
|
127
|
-
"generate_podspec"
|
|
128
|
-
]
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"name": "Switch pod",
|
|
132
|
-
"type": "Ruby",
|
|
133
|
-
"request": "launch",
|
|
134
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
135
|
-
"useBundler": true,
|
|
136
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
137
|
-
"showDebuggerOutput": true,
|
|
138
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
139
|
-
"args": [
|
|
140
|
-
"switch",
|
|
141
|
-
"-p",
|
|
142
|
-
"AFNetworking",
|
|
143
|
-
]
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"name": "Update LFS",
|
|
147
|
-
"type": "Ruby",
|
|
148
|
-
"request": "launch",
|
|
149
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
150
|
-
"useBundler": true,
|
|
151
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
152
|
-
"showDebuggerOutput": true,
|
|
153
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
154
|
-
"args": [
|
|
155
|
-
"update_lfs",
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"name": "Sync Podfile",
|
|
160
|
-
"type": "Ruby",
|
|
161
|
-
"request": "launch",
|
|
162
|
-
"cwd": "/Users/tomas/Documents/Xcode/Subito-iOS",
|
|
163
|
-
"useBundler": true,
|
|
164
|
-
"program": "${workspaceRoot}/exe/pod_builder",
|
|
165
|
-
"showDebuggerOutput": true,
|
|
166
|
-
"pathToRDebugIDE": "/usr/bin/rdebug-ide",
|
|
167
|
-
"args": [
|
|
168
|
-
"sync_podfile",
|
|
169
|
-
]
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
}
|