cocoapods-packager-ext 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ad62a8dc160d64ead487a2e59e5e6b33e9bff943165b7df7da198273bd83d43
4
- data.tar.gz: 0cf4177159dd6951e02adb9092189138bf1c17eec1fc0566a80305dc23ca8378
3
+ metadata.gz: 96a2d4d6711437b8b0ce934ce12057bf16d096ad08a05063cdf54ed61db65987
4
+ data.tar.gz: 0b4c98d7d03aaaa66b25763e48870a4aa09a269c5144a1744dfe0ad67b566dfb
5
5
  SHA512:
6
- metadata.gz: d3b645f21df405b9424be74ff9e0328d3d022f71acf549bbe848ad1f06d7cc725ba34d0e480f6708826238e5cae49c79137605d78812d14a3c10f5168d7d01b1
7
- data.tar.gz: c984f25781bd3a773d5533a767af2f6698d51caee4251e1c866ab89d36544ad1c625904560f7301efb0f483752ac20bd4d909def476b1c4e62c2fca52fdda520
6
+ metadata.gz: be0be828c37a362a515d010e946d786aa9d673a21f6f44e6d6fe8a63aa3d2cd26e9d988944f2ce3c63e3db17e55d43682ab17af7d3e07d8ee5a277cf2ea41ca3
7
+ data.tar.gz: 26d6bed6a8f98a000d27ea15128fdd9f4bec290e8841589f8391e270d72059a09c5bbdbdf7ffda8fe4f27ede556213ee2cd72c4fcf3ba53d52e28b4b28dbf904
@@ -0,0 +1,66 @@
1
+ require "fileutils"
2
+
3
+ module Pod
4
+ class Builder
5
+
6
+ def deal_target(path)
7
+ for item in @target_type_ext
8
+ if File.extname(path) == item
9
+ if File.directory? path
10
+ FileUtils.copy_entry(path,"#{@target_dir_ext_ext}/#{File.basename(path)}", false,false, true)
11
+ else
12
+ FileUtils.cp(path,"#{@target_dir_ext_ext}/#{File.basename(path)}")
13
+ end
14
+ return
15
+ end
16
+ end
17
+ if File.directory? path
18
+ is_black = false
19
+ for black in @black_list_ext
20
+ if black == path
21
+ is_black = true
22
+ break
23
+ end
24
+ end
25
+ if is_black
26
+ return
27
+ end
28
+ Dir.foreach(path) do |file|
29
+ if file != '.' && file != '..'
30
+ deal_target(path+'/'+file)
31
+ end
32
+ end
33
+
34
+ end
35
+ end
36
+
37
+ alias build_library_t build_library
38
+ def build_library(platform, defines, output)
39
+ deal_target(@static_sandbox_root)
40
+
41
+
42
+ build_library_t platform,defines,output
43
+ end
44
+
45
+ alias build_static_lib_for_ios_t build_static_lib_for_ios
46
+ def build_static_lib_for_ios(static_libs, _defines, output)
47
+ if @all_deps
48
+ return if static_libs.count == 0
49
+ sim_libs = static_libs_in_sandbox('build-sim')
50
+ `xcrun -r libtool -no_warning_for_no_symbols -static -o #{output} #{static_libs.join(' ')} #{sim_libs.join(' ')}`
51
+ else
52
+ build_static_lib_for_ios static_libs,_defines,output
53
+ end
54
+
55
+ end
56
+
57
+ alias initialize_t initialize
58
+ def initialize(source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps, all_deps)
59
+ @all_deps = all_deps
60
+ @target_type_ext = ['.a','.bundle']
61
+ @target_dir_ext_ext = "#{static_sandbox_root}/build"
62
+ @black_list_ext = ["#{static_sandbox_root}/build","#{static_sandbox_root}/build-sim"]
63
+ initialize_t(source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps)
64
+ end
65
+ end
66
+ end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPackagerExt
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packager-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyle.zhou
@@ -54,6 +54,7 @@ files:
54
54
  - lib/cocoapods-packager-ext.rb
55
55
  - lib/cocoapods-packager-ext/command.rb
56
56
  - lib/cocoapods-packager-ext/command/ext.rb
57
+ - lib/cocoapods-packager-ext/ext/builder.rb
57
58
  - lib/cocoapods-packager-ext/gem_version.rb
58
59
  - lib/cocoapods_plugin.rb
59
60
  - spec/command/ext_spec.rb