cocoapods-packager-ext 0.0.27 → 0.0.32

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: 0ef9bb3e65c3e233810884f3717314f0f57e7339c0c1033b7860671e9aaab58e
4
- data.tar.gz: 3ee71ef36791f0abc2d00d0edd60bbeed3a05e691aa1e2a4a3d16e272e2e5879
3
+ metadata.gz: 73aad4670e0835a37acaa91e16fa612e6a09b65d57577d4ec329ea29352779f0
4
+ data.tar.gz: 299c27370c0e83ea2a974bafc5459ec00063dee1992e38f22740b1ee22d74b84
5
5
  SHA512:
6
- metadata.gz: df0bf8fc80d5fa9249c8141cad9dee3e6c80df4864ce15816dfc3e34fc07ffb7b01d06517b01d80ffc183b450c14d6784c3cd90bab5d3600f2a26f8980bc357f
7
- data.tar.gz: c7576dd9cb0dc25541b8f58efb2b49ee7e9911f7b9410f9032bf969ca7c8527d61b6be88268ed09d8f286c37d55a790b33f47bdf922fe968df2bc232c8e9c1b3
6
+ metadata.gz: 9c0fcffa49b641db14d7170723e0fb94181562330e3dedd44d02614b3e3b4873aa9da7963ac1b9aea7e598754139001d50cc718513d08d634b2d404468b1d632
7
+ data.tar.gz: 9f54ff7fe7b714663f1c59c19774df52725fd7eaaeaedf1f0d1c2ea6bc696c56f163dc6be6b2e04c91d9c59912eb11f15ba8396fd082e96aa23c08c923b6216a
@@ -78,7 +78,7 @@ module Pod
78
78
  s.#{platform.name.to_s}.deployment_target = '#{platform.deployment_target}'
79
79
  s.#{platform.name.to_s}.vendored_libraries = ['#{platform.name.to_s}/*.a']
80
80
  s.#{platform.name.to_s}.public_header_files = ['#{platform.name.to_s}/Headers/*.{h}']
81
- s.#{platform.name.to_s}.source_files = ['#{platform.name.to_s}/Headers/*.{h}']
81
+ s.#{platform.name.to_s}.source_files = ['#{platform.name.to_s}/Headers/*.{h}',"#{platform.name.to_s}/Modules/module.modulemap"]
82
82
  s.#{platform.name.to_s}.resource = ['#{platform.name.to_s}/Resources/*.bundle']
83
83
  s.#{platform.name.to_s}.module_map = "#{platform.name.to_s}/Modules/module.modulemap"
84
84
  RB
@@ -5,7 +5,23 @@ module Pod
5
5
 
6
6
  alias build_static_library_t build_static_library
7
7
  def build_static_library
8
- build_static_library_t
8
+
9
+ UI.puts("Building static library #{@spec} with configuration #{@config}")
10
+
11
+ defines = compile
12
+ build_sim_libraries(defines)
13
+
14
+ platform_path = Pathname.new(@platform.name.to_s)
15
+ platform_path.mkdir unless platform_path.exist?
16
+
17
+ output = platform_path + "lib#{@spec.name}-#{@platform.name.to_s}.a"
18
+
19
+ if @platform.name == :ios
20
+ build_static_library_for_ios(output)
21
+ else
22
+ build_static_library_for_mac(output)
23
+ end
24
+
9
25
  platform_path = Pathname.new(@platform.name.to_s)
10
26
  header_path = platform_path+'Headers'
11
27
  header_path.mkpath unless header_path.exist?
@@ -23,6 +39,11 @@ module Pod
23
39
  if @exclude_dep_items.length > 0
24
40
  static_libs = static_libs_in_sandbox('build') + static_libs_in_sandbox('build-sim') + vendored_libraries
25
41
  static_libs.reject! {|lib| @exclude_dep_items.any? {|item| lib.to_s.include? item}}
42
+ UI.section 'Fetch output libs' do
43
+ static_libs.each do |lib|
44
+ UI.message lib
45
+ end
46
+ end
26
47
  libs = ios_architectures.map do |arch|
27
48
  library = "#{@static_sandbox_root}/build/package-#{arch}.a"
28
49
  `libtool -arch_only #{arch} -static -o #{library} #{static_libs.join(' ')}`
@@ -30,7 +51,7 @@ module Pod
30
51
  end
31
52
 
32
53
  `lipo -create -output #{output} #{libs.join(' ')}`
33
-
54
+
34
55
  # static_libs = static_libs_in_sandbox('build')
35
56
  # sim_libs = static_libs_in_sandbox('build-sim')
36
57
  # for item in @black_deps
@@ -212,9 +233,37 @@ MAP
212
233
  end
213
234
  end
214
235
 
236
+ alias xcodebuild_t xcodebuild
237
+
238
+ def xcodebuild(defines = '', args = '', build_dir = 'build', target = 'Pods-packager', project_root = @static_sandbox_root, config = @config)
239
+ if defined?(Pod::DONT_CODESIGN)
240
+ args = "#{args} CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO"
241
+ end
242
+
243
+ command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{config} -target #{target} -project #{project_root}/Pods.xcodeproj 2>&1"
244
+ output = `#{command}`.lines.to_a
245
+
246
+ if $?.exitstatus != 0
247
+ if ENV['ENABLE_BACKUP_WORKSPACE'] && (ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'YES' || ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'TRUE')
248
+ target_dir = "#{@source_dir}/#{@spec.name}-#{@spec.version}"
249
+ work_dir = Dir.pwd
250
+ `mv "#{work_dir}" "#{target_dir}"`
251
+ end
252
+ puts UI::BuildFailedReport.report(command, output)
253
+
254
+ # Note: We use `Process.exit` here because it fires a `SystemExit`
255
+ # exception, which gives the caller a chance to clean up before the
256
+ # process terminates.
257
+ #
258
+ # See http://ruby-doc.org/core-1.9.3/Process.html#method-c-exit
259
+ Process.exit
260
+ end
261
+ end
262
+
215
263
  alias initialize_t initialize
216
264
  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
265
+ @exclude_dep_items = ['libPods-packager.a']
266
+ @exclude_dep_items.concat(exclude_dep_items) if exclude_dep_items
218
267
  @select_archs = select_archs
219
268
  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)
220
269
  end
@@ -0,0 +1,25 @@
1
+ require 'pathname'
2
+ module Pod
3
+ class Validator
4
+
5
+ alias _xcodebuild_t _xcodebuild
6
+ def _xcodebuild(command, raise_on_failure = false)
7
+ begin
8
+ _xcodebuild_t(command, raise_on_failure)
9
+ rescue => e
10
+ if ENV['PUSH_BACKUP_PATH']
11
+ for item in command
12
+ if item.include?(".xcworkspace")
13
+ # puts command.join(' ')
14
+ path = Pathname.new(item).parent
15
+ puts path
16
+ `mv #{path} #{ENV['PUSH_BACKUP_PATH']}`
17
+ end
18
+ end
19
+ end
20
+ raise e
21
+ end
22
+ end
23
+
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPackagerExt
2
- VERSION = "0.0.27"
2
+ VERSION = "0.0.32"
3
3
  end
@@ -1,2 +1,3 @@
1
1
  require 'cocoapods-packager-ext/command'
2
2
  require 'cocoapods-packager-ext/ext/builder.rb'
3
+ require 'cocoapods-packager-ext/ext/validator.rb'
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.27
4
+ version: 0.0.32
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-05-24 00:00:00.000000000 Z
11
+ date: 2021-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,6 +73,7 @@ files:
73
73
  - lib/cocoapods-packager-ext/ext/downloader/lnpath.rb
74
74
  - lib/cocoapods-packager-ext/ext/downloader_ext.rb
75
75
  - lib/cocoapods-packager-ext/ext/pod_utils.rb
76
+ - lib/cocoapods-packager-ext/ext/validator.rb
76
77
  - lib/cocoapods-packager-ext/gem_version.rb
77
78
  - lib/cocoapods_plugin.rb
78
79
  - spec/command/ext_spec.rb