cocoapods-packager-ext 0.0.15 → 0.0.25

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: 8c9348a830f7157f3b0331be8528d62167b0fc2e57de1e303cd8302a83fab703
4
- data.tar.gz: 68acb37a1efc18f3e97dd44e5b49f39d2771b1360cbfeeabacc5480f64d8d1f9
3
+ metadata.gz: 843ed35c16571ceeee0764e3e4c57a04e7b4a685034b5dcc84a2e93749f25d4d
4
+ data.tar.gz: 89aa1981270916590dbbc66498003827fe8767ac9e7649b73b7d4e83f580cfb7
5
5
  SHA512:
6
- metadata.gz: d57083f40c95d0f75d4045605c877873eb1ebda93685bcdb51d2c7ffe4f0315daf9283ecb5d7d52091bd6ca387dd69ba815f46116d514f51d57b13d88d6ebb79
7
- data.tar.gz: a332c19502173bda40694c68879807d4b054ef3b67b1374d226690d3267934f64c0d7e81b642df33f5028f6ace91f25f1104c326affad33b650b54630f43ec4b
6
+ metadata.gz: 7b7444d6c654437884ff56f75db10c5121f1baf2019905602cb50b5fee3b1619639c7709b0e980d6425edfd60afca93a398a643ffbc62c90d4f5b9b4f6355159
7
+ data.tar.gz: 61bcc0509f78db3166daf2611025447ced051b42be36d9255f84603aa5f1782024edfd3c36494fe55e40b305c0ed9791da873f351fbefde43f31daa7bb545117
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.3'
22
22
  spec.add_development_dependency 'rake'
23
- spec.add_runtime_dependency(%q<cocoapods-packager>.freeze,["1.5.0"])
23
+ spec.add_runtime_dependency(%q<cocoapods-packager>.freeze,["1.5.1"])
24
24
 
25
25
  end
@@ -1,5 +1,7 @@
1
1
  require 'cocoapods-packager-ext/ext/downloader/lnpath'
2
2
  require 'cocoapods-packager-ext/ext/downloader_ext'
3
+ require 'cocoapods-packager-ext/ext/pod_utils'
4
+
3
5
  module Pod
4
6
  class Command
5
7
  # This is an example of a cocoapods plugin adding a top-level subcommand
@@ -26,10 +28,9 @@ module Pod
26
28
  alias options_t options
27
29
  def options
28
30
  o = options_t
29
- o.push(['--all-deps','add all-depends'])
30
31
  o.push(['--archs','select archs'])
31
- o.push(['--black-deps','select exclude deps'])
32
32
  o.push(['--podfile','select deps version from podfile'])
33
+ o.push(['--platform','select platform'])
33
34
  o.concat(super)
34
35
  end
35
36
  rescue
@@ -41,17 +42,89 @@ module Pod
41
42
 
42
43
  alias initialize_t initialize
43
44
  def initialize(argv)
44
- @all_deps = argv.flag?('all-deps',false)
45
+ @exclude_dep_items = argv.option('exclude-deps','').split(',')
45
46
  @select_archs = argv.option('archs','').split(',')
46
- @black_deps = argv.option('black-deps','').split(',')
47
47
  @podfile = argv.option('podfile','')
48
+ @platform = argv.option('platform','')
48
49
  initialize_t argv
49
50
  end
50
51
 
52
+ alias build_in_sandbox_t build_in_sandbox
53
+ def build_in_sandbox(platform)
54
+ config.installation_root = Pathname.new(Dir.pwd)
55
+ config.sandbox_root = 'Pods'
56
+
57
+ static_sandbox = build_static_sandbox(@dynamic)
58
+ static_installer = install_pod(platform.name, static_sandbox)
59
+
60
+ if @dynamic
61
+ dynamic_sandbox = build_dynamic_sandbox(static_sandbox, static_installer)
62
+ install_dynamic_pod(dynamic_sandbox, static_sandbox, static_installer, platform)
63
+ end
64
+
65
+ begin
66
+ perform_build(platform, static_sandbox, dynamic_sandbox, static_installer)
67
+ ensure # in case the build fails; see Builder#xcodebuild.
68
+ if not ENV['ENABLE_BACKUP_WORKSPACE']
69
+ Pathname.new(config.sandbox_root).rmtree
70
+ FileUtils.rm_f('Podfile.lock')
71
+ end
72
+ end
73
+ end
74
+
75
+ def spec_library(platform)
76
+ spec = <<RB
77
+ s.#{platform.name.to_s}.deployment_target = '#{platform.deployment_target}'
78
+ s.#{platform.name.to_s}.vendored_libraries = ['#{platform.name.to_s}/*.a']
79
+ s.#{platform.name.to_s}.public_header_files = ['#{platform.name.to_s}/Headers/*.{h}']
80
+ s.#{platform.name.to_s}.source_files = ['#{platform.name.to_s}/Headers/*.{h}']
81
+ s.#{platform.name.to_s}.resource = ['#{platform.name.to_s}/Resources/*.bundle']
82
+ s.#{platform.name.to_s}.module_map = "#{platform.name.to_s}/Modules/module.modulemap"
83
+ RB
84
+ end
85
+
86
+ def spec_framework(platform)
87
+ spec = <<RB
88
+ s.#{platform.name.to_s}.public_header_files = ['#{platform.name.to_s}/Headers/*.{h}']
89
+ s.#{platform.name.to_s}.source_files = ['#{platform.name.to_s}/**/Headers/*.{h}']
90
+ s.#{platform.name.to_s}.resource = ['#{platform.name.to_s}/**/Resources/*.bundle']
91
+ s.#{platform.name.to_s}.module_map = "#{platform.name.to_s}/**/Modules/module.modulemap"
92
+ RB
93
+ end
94
+
95
+ alias build_package_t build_package
96
+ def build_package
97
+ if @platform == ''
98
+ build_package_t
99
+ else
100
+ builder = SpecBuilder.new(@spec, @source, @embedded, @dynamic)
101
+ newspec = builder.spec_metadata
102
+
103
+ @spec.available_platforms.each do |platform|
104
+ if @platform.include?(platform.name.to_s)
105
+ UI.puts 'build package platform:'+platform.name.to_s
106
+ build_in_sandbox(platform)
107
+ if @library
108
+ newspec += spec_library(platform)
109
+ else
110
+ newspec += builder.spec_platform(platform)
111
+ end
112
+
113
+
114
+ else
115
+ UI.puts 'jump build platforms:'+platform.to_s
116
+ end
117
+ end
118
+
119
+ newspec += builder.spec_close
120
+ File.open(@spec.name + '.podspec', 'w') { |file| file.write(newspec) }
121
+ end
122
+
123
+ end
51
124
 
52
125
  alias perform_build_t perform_build
53
- def perform_build(platform, static_sandbox, dynamic_sandbox)
54
- if @all_deps
126
+ def perform_build(platform, static_sandbox, dynamic_sandbox,static_installer)
127
+ if @select_archs.length > 0 || @exclude_dep_items.length > 0
55
128
  static_sandbox_root = config.sandbox_root.to_s
56
129
 
57
130
  if @dynamic
@@ -60,28 +133,29 @@ module Pod
60
133
  end
61
134
 
62
135
  builder = Pod::Builder.new(
63
- @source_dir,
64
- static_sandbox_root,
65
- dynamic_sandbox_root,
66
- static_sandbox.public_headers.root,
67
- @spec,
68
- @embedded,
69
- @mangle,
70
- @dynamic,
71
- @config,
72
- @bundle_identifier,
73
- @exclude_deps,
74
- @all_deps,
75
- @black_deps,
76
- @select_archs
136
+ platform,
137
+ static_installer,
138
+ @source_dir,
139
+ static_sandbox_root,
140
+ dynamic_sandbox_root,
141
+ static_sandbox.public_headers.root,
142
+ @spec,
143
+ @embedded,
144
+ @mangle,
145
+ @dynamic,
146
+ @config,
147
+ @bundle_identifier,
148
+ @exclude_deps,
149
+ @exclude_dep_items,
150
+ @select_archs
77
151
  )
78
152
 
79
- builder.build(platform, @library)
153
+ builder.build(@package_type)
80
154
 
81
155
  return unless @embedded
82
156
  builder.link_embedded_resources
83
157
  else
84
- perform_build_t(platform,static_sandbox,dynamic_sandbox)
158
+ perform_build_t(platform,static_sandbox,dynamic_sandbox,static_installer)
85
159
  end
86
160
  end
87
161
 
@@ -2,108 +2,221 @@ require "fileutils"
2
2
 
3
3
  module Pod
4
4
  class Builder
5
-
6
- def deal_target(path)
7
- for item in @target_type_ext
8
- if File.extname(path) == item
9
- isBlack = false
10
- for black in @black_deps
11
- if File.basename(path).include? black
12
- isBlack = true
13
- end
14
- end
15
- if isBlack
16
- return
17
- end
18
- begin
19
- if File.directory? path
20
- FileUtils.copy_entry(path,"#{@target_dir_ext_ext}/#{File.basename(path)}", false,false, true)
21
- else
22
- FileUtils.cp(path,"#{@target_dir_ext_ext}/#{File.basename(path)}")
23
- end
24
- rescue Exception => e
25
- puts e
26
- end
27
- return
28
- end
29
- end
30
- if File.directory? path
31
- is_black = false
32
- for black in @black_list_ext
33
- if black == path
34
- is_black = true
35
- break
36
- end
37
- end
38
- if is_black
39
- return
40
- end
41
- Dir.foreach(path) do |file|
42
- if file != '.' && file != '..'
43
- deal_target(path+'/'+file)
44
- end
5
+
6
+ alias build_static_library_t build_static_library
7
+ def build_static_library
8
+ build_static_library_t
9
+ platform_path = Pathname.new(@platform.name.to_s)
10
+ header_path = platform_path+'Headers'
11
+ header_path.mkpath unless header_path.exist?
12
+
13
+ module_map_path = platform_path+'Modules'
14
+ module_map_path.mkpath unless module_map_path.exist?
15
+ copy_headers_to_target header_path,module_map_path
16
+
17
+ resources_path = platform_path+'Resources'
18
+ resources_path.mkpath unless resources_path.exist?
19
+ copy_resources_to_target resources_path
20
+ end
21
+ alias build_static_library_for_ios_t build_static_library_for_ios
22
+ def build_static_library_for_ios(output)
23
+ if @exclude_dep_items.length > 0
24
+ static_libs = static_libs_in_sandbox('build') + static_libs_in_sandbox('build-sim') + vendored_libraries
25
+ static_libs.reject! {|lib| @exclude_dep_items.any? {|item| lib.to_s.include? item}}
26
+ libs = ios_architectures.map do |arch|
27
+ library = "#{@static_sandbox_root}/build/package-#{arch}.a"
28
+ `libtool -arch_only #{arch} -static -o #{library} #{static_libs.join(' ')}`
29
+ library
45
30
  end
31
+
32
+ `lipo -create -output #{output} #{libs.join(' ')}`
46
33
 
34
+ # static_libs = static_libs_in_sandbox('build')
35
+ # sim_libs = static_libs_in_sandbox('build-sim')
36
+ # for item in @black_deps
37
+ # static_libs.delete_if do |obj|
38
+ # obj.include? item
39
+ # end
40
+ # sim_libs.delete_if do |obj|
41
+ # obj.include? item
42
+ # end
43
+ # end
44
+ # UI.puts "links statics:#{static_libs.join(' ')}, sim_libs:#{sim_libs.join(' ')}"
45
+ # `xcrun -r libtool -no_warning_for_no_symbols -static -o #{output} #{static_libs.join(' ')} #{sim_libs.join(' ')}`
46
+ else
47
+ build_static_library_for_ios_t output
47
48
  end
48
49
  end
49
50
 
50
- alias build_library_t build_library
51
- def build_library(platform, defines, output)
52
- deal_target(@static_sandbox_root)
53
-
54
51
 
55
- build_library_t platform,defines,output
52
+ alias static_linker_flags_in_sandbox_t ios_architectures
53
+ def static_linker_flags_in_sandbox
54
+ static_libs = static_libs_in_sandbox('build') + static_libs_in_sandbox('build-sim') + vendored_libraries
55
+ linker_flags = static_libs.map do |lib|
56
+ lib = lib.chomp('.a').split('/').last
57
+ lib.slice!('lib')
58
+ "-l#{lib}"
59
+ end
60
+ linker_flags.reject { |e| e == "-l#{@spec.name}" || e == '-lPods-packager' }
56
61
  end
57
62
 
58
- alias ios_build_options_t ios_build_options
59
63
  def ios_build_options
64
+ if ENV['DISABLE_BITCODE']
65
+ "ARCHS=\'#{ios_architectures.join(' ')}\' OTHER_CFLAGS=\'-Qunused-arguments\'"
66
+ else
67
+ "ARCHS=\'#{ios_architectures.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
68
+ end
69
+ end
70
+
71
+ def static_linker_defines
72
+ static_libs = static_libs_in_sandbox('build') + static_libs_in_sandbox('build-sim')
73
+ static_libs = static_libs.map { |path| Pathname("#{Dir.pwd}/#{path}").parent.to_s }
74
+ vendored_libs = vendored_libraries.map { |path| Pathname(path).parent.to_s }
75
+ link_paths = static_libs + vendored_libs
76
+ link_paths.uniq.join(" ")
77
+ end
78
+ alias build_dynamic_framework_for_ios_t build_dynamic_framework_for_ios
79
+ def build_dynamic_framework_for_ios(defines, output)
80
+ # Specify frameworks to link and search paths
81
+ linker_flags = static_linker_flags_in_sandbox
82
+ defines = "#{defines} OTHER_LDFLAGS='$(inherited) #{linker_flags.join(' ')}'"
83
+
84
+ # Build Target Dynamic Framework for both device and Simulator
85
+ device_defines = "#{defines} LIBRARY_SEARCH_PATHS=\"#{static_linker_defines}\""
86
+ device_options = ios_build_options << ' -sdk iphoneos'
87
+ xcodebuild(device_defines, device_options, 'build', @spec.name.to_s, @dynamic_sandbox_root.to_s)
88
+ if @select_archs.size == 0 || @select_archs.include?('i386') || @select_archs.include?('x86_64')
89
+ sim_defines = "#{defines} LIBRARY_SEARCH_PATHS=\"#{Dir.pwd}/#{@static_sandbox_root}/build-sim\" ONLY_ACTIVE_ARCH=NO"
90
+ xcodebuild(sim_defines, '-sdk iphonesimulator', 'build-sim', @spec.name.to_s, @dynamic_sandbox_root.to_s)
91
+ # Combine architectures
92
+ `lipo #{@dynamic_sandbox_root}/build/#{@spec.name}.framework/#{@spec.name} #{@dynamic_sandbox_root}/build-sim/#{@spec.name}.framework/#{@spec.name} -create -output #{output}`
93
+ else
94
+ `mv #{@dynamic_sandbox_root}/build/#{@spec.name}.framework/#{@spec.name} #{output}`
95
+ end
96
+
97
+ FileUtils.mkdir(@platform.name.to_s)
98
+ `mv #{@dynamic_sandbox_root}/build/#{@spec.name}.framework #{@platform.name}`
99
+ `mv #{@dynamic_sandbox_root}/build/#{@spec.name}.framework.dSYM #{@platform.name}`
100
+ end
101
+
102
+ alias ios_architectures_t ios_architectures
103
+ def ios_architectures
60
104
  if @select_archs.size != 0
61
- return "ARCHS=\'#{@select_archs.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
105
+ return @select_archs
62
106
  else
63
- return "ARCHS=\'x86_64 i386 arm64 armv7\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
107
+ return ios_architectures_t
64
108
  end
65
109
  end
66
110
 
67
- alias build_sim_libraries_t build_sim_libraries
68
- def build_sim_libraries(platform, defines)
69
- if @select_archs.size != 0 && !@select_archs.include?('i386') && !@select_archs.include?('x86_64')
70
- return
71
- else
72
- UI.puts 'start build sim'
73
- build_sim_libraries_t platform,defines
74
- end
111
+ alias copy_headers_t copy_headers
112
+ def copy_headers
113
+ copy_headers_to_target @fwk.headers_path
75
114
  end
76
115
 
77
- alias build_static_lib_for_ios_t build_static_lib_for_ios
78
- def build_static_lib_for_ios(static_libs, _defines, output)
79
- if @all_deps
80
- return if static_libs.count == 0
81
- sim_libs = static_libs_in_sandbox('build-sim')
82
- for item in @black_deps
83
- static_libs.delete_if do |obj|
84
- obj.include? item
85
- end
86
- sim_libs.delete_if do |obj|
87
- obj.include? item
116
+ def copy_headers_to_target(headers_target_path = nil ,module_map_target_path = nil )
117
+ headers_target_path = @fwk.headers_path if headers_target_path.nil?
118
+ module_map_target_path = @fwk.module_map_path if module_map_target_path.nil?
119
+
120
+ headers_source_root = "#{@public_headers_root}/#{@spec.name}"
121
+
122
+ Dir.glob("#{headers_source_root}/**/*.h").
123
+ each { |h| `ditto #{h} #{headers_target_path}/#{h.sub(headers_source_root, '')}` }
124
+
125
+ # If custom 'module_map' is specified add it to the framework distribution
126
+ # otherwise check if a header exists that is equal to 'spec.name', if so
127
+ # create a default 'module_map' one using it.
128
+ if !@spec.module_map.nil?
129
+ module_map_file = @file_accessors.flat_map(&:module_map).first
130
+ module_map = File.read(module_map_file) if Pathname(module_map_file).exist?
131
+ elsif File.exist?("#{@public_headers_root}/#{@spec.name}/#{@spec.name}.h")
132
+ module_map = <<MAP
133
+ framework module #{@spec.name} {
134
+ umbrella header "#{@spec.name}.h"
135
+
136
+ export *
137
+ module * { export * }
138
+ }
139
+ MAP
140
+ else
141
+
142
+ f = File.new(File.join("#{headers_target_path}","#{@spec.name}.h"), "w+")
143
+ f.puts("#import <UIKit/UIKit.h>")
144
+ f.puts("#import <Foundation/Foundation.h>")
145
+ Dir.foreach(headers_target_path) do |filename|
146
+ if filename != "." and filename != ".."
147
+ f.puts("#import \"#{filename}\"")
88
148
  end
89
149
  end
90
- UI.puts "links statics:#{static_libs.join(' ')}, sim_libs:#{sim_libs.join(' ')}"
91
- `xcrun -r libtool -no_warning_for_no_symbols -static -o #{output} #{static_libs.join(' ')} #{sim_libs.join(' ')}`
150
+ f.close
151
+
152
+ module_map = <<MAP
153
+ framework module #{@spec.name} {
154
+ umbrella header "#{@spec.name}.h"
155
+
156
+ export *
157
+ module * { export * }
158
+ }
159
+ MAP
160
+ end
161
+
162
+ unless module_map.nil?
163
+ module_map_target_path.mkpath unless module_map_target_path.exist?
164
+ File.write("#{module_map_target_path}/module.modulemap", module_map)
165
+ end
166
+ end
167
+
168
+ alias copy_resources_t copy_resources
169
+ def copy_resources
170
+ copy_resources_to_target @fwk.resources_path
171
+ end
172
+ def copy_resources_to_target(resources_target_path = nil )
173
+ resources_target_path = @fwk.resources_path if resources_target_path.nil?
174
+ if @exclude_deps
175
+ bundles = @static_installer.pod_targets.flat_map(&:file_accessors).flat_map{|item|item.resources}
92
176
  else
93
- build_static_lib_for_ios static_libs,_defines,output
177
+ bundles = @static_installer.pod_targets.reject { |t| @exclude_dep_items.any?{|item|t.pod_name == item}}.flat_map(&:file_accessors).flat_map{|item|item.resources}
94
178
  end
95
-
179
+ if @dynamic
180
+ resources_path = "ios/#{@spec.name}.framework"
181
+ bundles.tap{|path| FileUtils.cp_r path,resources_path}
182
+ `cp -rp #{@static_sandbox_root}/build/*.bundle #{resources_path} 2>&1`
183
+ else
184
+ `cp -rp #{@static_sandbox_root}/build/*.bundle #{resources_path} 2>&1`
185
+ resources = expand_paths(@spec.consumer(@platform).resources)
186
+ if resources.count == 0 && bundles.count == 0
187
+ if @fwk
188
+ @fwk.delete_resources
189
+ else
190
+ if resources_target_path.exist?
191
+ FileUtils.rm_rf resources_target_path
192
+ end
193
+ end
194
+ return
195
+ end
196
+ if resources.count > 0
197
+ `cp -rp #{resources.join(' ')} #{resources_target_path}`
198
+ end
199
+ if bundles.count > 0
200
+ `cp -rp #{bundles.join(' ')} #{resources_target_path}`
201
+ end
202
+ end
203
+ end
204
+
205
+ alias build_sim_libraries_t build_sim_libraries
206
+ def build_sim_libraries(defines)
207
+ if @select_archs.size != 0 && !@select_archs.include?('i386') && !@select_archs.include?('x86_64')
208
+ return
209
+ else
210
+ UI.puts 'start build sim'
211
+ build_sim_libraries_t defines
212
+ end
96
213
  end
97
214
 
98
215
  alias initialize_t initialize
99
- def initialize(source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps, all_deps,black_deps,select_archs)
100
- @all_deps = all_deps
101
- @black_deps = black_deps
216
+ def initialize(platform, static_installer, source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps,exclude_dep_items=[],select_archs=[])
217
+ @exclude_dep_items = exclude_dep_items
102
218
  @select_archs = select_archs
103
- @target_type_ext = ['.a','.bundle']
104
- @target_dir_ext_ext = "#{static_sandbox_root}/build"
105
- @black_list_ext = ["#{static_sandbox_root}/build","#{static_sandbox_root}/build-sim"]
106
- initialize_t(source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps)
219
+ initialize_t(platform, static_installer,source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps)
107
220
  end
108
221
  end
109
222
  end
@@ -0,0 +1,57 @@
1
+ module Pod
2
+ class Command
3
+ class Package
4
+
5
+ # @param [Pod::Installer] static_installer
6
+ #
7
+ # @return [Pod::PodTarget]
8
+ #
9
+ alias build_dynamic_target_t build_dynamic_target
10
+
11
+ def build_dynamic_target(dynamic_sandbox, static_installer, platform)
12
+ spec_targets = static_installer.pod_targets.select do |target|
13
+ target.name == @spec.name
14
+ end
15
+ static_target = spec_targets[0]
16
+
17
+ file_accessors = create_file_accessors(static_target, dynamic_sandbox)
18
+
19
+ archs = []
20
+ dynamic_target = Pod::PodTarget.new(dynamic_sandbox, BuildType.dynamic_framework, static_target.user_build_configurations, archs, platform, static_target.specs, static_target.target_definitions, file_accessors)
21
+ dynamic_target
22
+ end
23
+ alias copy_dynamic_target_t copy_dynamic_target
24
+ def copy_dynamic_target(static_sandbox, _dynamic_target, dynamic_sandbox)
25
+ command = "ln -sf #{static_sandbox.root}/#{@spec.name} #{dynamic_sandbox.root}"
26
+ `#{command}`
27
+ end
28
+
29
+ alias write_pod_project_t write_pod_project
30
+ def write_pod_project(dynamic_project, dynamic_sandbox)
31
+ UI.message "- Writing Xcode project file to #{UI.path dynamic_sandbox.project_path}" do
32
+ dynamic_project.pods.remove_from_project if dynamic_project.pods.empty?
33
+ dynamic_project.development_pods.remove_from_project if dynamic_project.development_pods.empty?
34
+ dynamic_project.sort(:groups_position => :below)
35
+ dynamic_project.recreate_user_schemes(false)
36
+
37
+ # Edit search paths so that we can find our dependency headers
38
+ dynamic_project.targets.first.build_configuration_list.build_configurations.each do |config|
39
+ header_path = Dir.glob("#{Dir.pwd}/Pods/Static/Headers/*/*")
40
+ header_path.push "#{Dir.pwd}/Pods/Static/Headers/Public"
41
+ header_path.push "#{Dir.pwd}/Pods/Static/Headers/Private"
42
+ header_path.reject! {|item|item.split('/').last == dynamic_project.targets.first.name}
43
+ header_path = header_path.join " "
44
+ config.build_settings['HEADER_SEARCH_PATHS'] = "$(inherited) #{header_path}"
45
+ config.build_settings['USER_HEADER_SEARCH_PATHS'] = "$(inherited) #{header_path}"
46
+ config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ObjC'
47
+
48
+ if ENV['DISABLE_BITCODE']
49
+ config.build_settings['ENABLE_BITCODE'] = 'NO'
50
+ end
51
+ end
52
+ dynamic_project.save
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPackagerExt
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packager-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyle.zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-26 00:00:00.000000000 Z
11
+ date: 2021-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.5.0
47
+ version: 1.5.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.5.0
54
+ version: 1.5.1
55
55
  description: A short description of cocoapods-packager-ext.
56
56
  email:
57
57
  - kyle.zhou@qq.com
@@ -72,6 +72,7 @@ files:
72
72
  - lib/cocoapods-packager-ext/ext/builder.rb
73
73
  - lib/cocoapods-packager-ext/ext/downloader/lnpath.rb
74
74
  - lib/cocoapods-packager-ext/ext/downloader_ext.rb
75
+ - lib/cocoapods-packager-ext/ext/pod_utils.rb
75
76
  - lib/cocoapods-packager-ext/gem_version.rb
76
77
  - lib/cocoapods_plugin.rb
77
78
  - spec/command/ext_spec.rb