cocoapods-packager-ext 0.0.1 → 0.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4264f49f24386e48fa678503705130bef2ba23e3b8fc5a0a14b8ee1db209ae75
|
4
|
+
data.tar.gz: a101e747b0c0c9b2095eff2dffc6bc8e60525b9b85902c60aac8c06420ad6278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afbebc6f08605c3794b6e737d8d66fd409e846ffaef642b04d1af8e94324e275b1afcf0b25247746c0699362bb2f1021b288d43b53bbcf99d9155a8e711d19c6
|
7
|
+
data.tar.gz: ac8bf3ff35af21113b2171682707fbc67832700f9cece448df28222523843caa3345a5ce0f2afe5af4ed2f3e889f4294e0f32108f0101a14d2e11938996d271d
|
@@ -23,6 +23,9 @@ module Pod
|
|
23
23
|
def options
|
24
24
|
o = options_t
|
25
25
|
o.push(['--all-deps','add all-depends'])
|
26
|
+
o.push(['--archs','select archs'])
|
27
|
+
o.push(['--black-deps','select exclude deps'])
|
28
|
+
|
26
29
|
end
|
27
30
|
|
28
31
|
end
|
@@ -30,6 +33,8 @@ module Pod
|
|
30
33
|
alias initialize_t initialize
|
31
34
|
def initialize(argv)
|
32
35
|
@all_deps = argv.flag?('all-deps',false)
|
36
|
+
@select_archs = argv.option('archs','').split(',')
|
37
|
+
@black_deps = argv.option('black-deps','').split(',')
|
33
38
|
initialize_t argv
|
34
39
|
end
|
35
40
|
|
@@ -56,7 +61,9 @@ module Pod
|
|
56
61
|
@config,
|
57
62
|
@bundle_identifier,
|
58
63
|
@exclude_deps,
|
59
|
-
@all_deps
|
64
|
+
@all_deps,
|
65
|
+
@black_deps,
|
66
|
+
@select_archs
|
60
67
|
)
|
61
68
|
|
62
69
|
builder.build(platform, @library)
|
@@ -0,0 +1,96 @@
|
|
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
|
+
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
|
+
if File.directory? path
|
19
|
+
FileUtils.copy_entry(path,"#{@target_dir_ext_ext}/#{File.basename(path)}", false,false, true)
|
20
|
+
else
|
21
|
+
FileUtils.cp(path,"#{@target_dir_ext_ext}/#{File.basename(path)}")
|
22
|
+
end
|
23
|
+
return
|
24
|
+
end
|
25
|
+
end
|
26
|
+
if File.directory? path
|
27
|
+
is_black = false
|
28
|
+
for black in @black_list_ext
|
29
|
+
if black == path
|
30
|
+
is_black = true
|
31
|
+
break
|
32
|
+
end
|
33
|
+
end
|
34
|
+
if is_black
|
35
|
+
return
|
36
|
+
end
|
37
|
+
Dir.foreach(path) do |file|
|
38
|
+
if file != '.' && file != '..'
|
39
|
+
deal_target(path+'/'+file)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
alias build_library_t build_library
|
47
|
+
def build_library(platform, defines, output)
|
48
|
+
deal_target(@static_sandbox_root)
|
49
|
+
|
50
|
+
|
51
|
+
build_library_t platform,defines,output
|
52
|
+
end
|
53
|
+
|
54
|
+
alias ios_build_options_t ios_build_options
|
55
|
+
def ios_build_options
|
56
|
+
if @select_archs.size != 0
|
57
|
+
return "ARCHS=\'#{@select_archs.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
|
58
|
+
else
|
59
|
+
return ios_build_options_t
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
alias build_sim_libraries_t build_sim_libraries
|
64
|
+
def build_sim_libraries(platform, defines)
|
65
|
+
if @select_archs.size != 0 && !@select_archs.include?('i386') && !@select_archs.include?('x86_64')
|
66
|
+
return
|
67
|
+
else
|
68
|
+
UI.puts 'start build sim'
|
69
|
+
build_sim_libraries_t platform,defines
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
alias build_static_lib_for_ios_t build_static_lib_for_ios
|
74
|
+
def build_static_lib_for_ios(static_libs, _defines, output)
|
75
|
+
if @all_deps
|
76
|
+
return if static_libs.count == 0
|
77
|
+
sim_libs = static_libs_in_sandbox('build-sim')
|
78
|
+
`xcrun -r libtool -no_warning_for_no_symbols -static -o #{output} #{static_libs.join(' ')} #{sim_libs.join(' ')}`
|
79
|
+
else
|
80
|
+
build_static_lib_for_ios static_libs,_defines,output
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
alias initialize_t initialize
|
86
|
+
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)
|
87
|
+
@all_deps = all_deps
|
88
|
+
@black_deps = black_deps
|
89
|
+
@select_archs = select_archs
|
90
|
+
@target_type_ext = ['.a','.bundle']
|
91
|
+
@target_dir_ext_ext = "#{static_sandbox_root}/build"
|
92
|
+
@black_list_ext = ["#{static_sandbox_root}/build","#{static_sandbox_root}/build-sim"]
|
93
|
+
initialize_t(source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
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.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kyle.zhou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: cocoapods-packager
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: A short description of cocoapods-packager-ext.
|
42
56
|
email:
|
43
57
|
- kyle.zhou@qq.com
|
@@ -54,6 +68,7 @@ files:
|
|
54
68
|
- lib/cocoapods-packager-ext.rb
|
55
69
|
- lib/cocoapods-packager-ext/command.rb
|
56
70
|
- lib/cocoapods-packager-ext/command/ext.rb
|
71
|
+
- lib/cocoapods-packager-ext/ext/builder.rb
|
57
72
|
- lib/cocoapods-packager-ext/gem_version.rb
|
58
73
|
- lib/cocoapods_plugin.rb
|
59
74
|
- spec/command/ext_spec.rb
|