cocoapods-packager-ext 0.0.15 → 0.0.21
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: 3fe4f327fcf1e83c2c98b3e7536e32d0a7a282d35d2a01785e976ec5d42ea490
|
4
|
+
data.tar.gz: 8e511d747b8cd997dad144f8bdbc07fb291798524022db110c63a23eb0a0d2d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3d309b76e55409eb00290a3a8417f748f78ebc381d3ad4276d262d602b87391381765e60e469caf0f4922de3846f0de8181f3d130cde37fa2da899f72024ffd
|
7
|
+
data.tar.gz: '05863f3099b61ba477b227eca7734f52fcb2deac2cd549f55042cdcd6b51ec9d9712df4acee2d572981ef768b3b0bbc06959f0ae2185d8596931b8ff7f73ed37'
|
@@ -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.
|
23
|
+
spec.add_runtime_dependency(%q<cocoapods-packager>.freeze,["1.5.1"])
|
24
24
|
|
25
25
|
end
|
@@ -26,10 +26,11 @@ module Pod
|
|
26
26
|
alias options_t options
|
27
27
|
def options
|
28
28
|
o = options_t
|
29
|
-
o.push(['--all-deps','
|
29
|
+
o.push(['--all-deps','embedded all-depends'])
|
30
30
|
o.push(['--archs','select archs'])
|
31
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
|
@@ -45,13 +46,39 @@ module Pod
|
|
45
46
|
@select_archs = argv.option('archs','').split(',')
|
46
47
|
@black_deps = argv.option('black-deps','').split(',')
|
47
48
|
@podfile = argv.option('podfile','')
|
49
|
+
@platform = argv.option('platform','')
|
48
50
|
initialize_t argv
|
49
51
|
end
|
50
52
|
|
53
|
+
alias build_package_t build_package
|
54
|
+
def build_package
|
55
|
+
if @platform == ''
|
56
|
+
build_package_t
|
57
|
+
else
|
58
|
+
builder = SpecBuilder.new(@spec, @source, @embedded, @dynamic)
|
59
|
+
newspec = builder.spec_metadata
|
60
|
+
|
61
|
+
@spec.available_platforms.each do |platform|
|
62
|
+
if @platform.include?(platform.name.to_s)
|
63
|
+
UI.puts 'build package platform:'+platform.name.to_s
|
64
|
+
build_in_sandbox(platform)
|
65
|
+
newspec += builder.spec_platform(platform)
|
66
|
+
else
|
67
|
+
UI.puts 'jump build platforms:'+platform.to_s
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
newspec += builder.spec_close
|
72
|
+
File.open(@spec.name + '.podspec', 'w') { |file| file.write(newspec) }
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
end
|
51
78
|
|
52
79
|
alias perform_build_t perform_build
|
53
|
-
def perform_build(platform, static_sandbox, dynamic_sandbox)
|
54
|
-
if @all_deps
|
80
|
+
def perform_build(platform, static_sandbox, dynamic_sandbox,static_installer)
|
81
|
+
if @all_deps || @select_archs.length > 0
|
55
82
|
static_sandbox_root = config.sandbox_root.to_s
|
56
83
|
|
57
84
|
if @dynamic
|
@@ -60,28 +87,30 @@ module Pod
|
|
60
87
|
end
|
61
88
|
|
62
89
|
builder = Pod::Builder.new(
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
90
|
+
platform,
|
91
|
+
static_installer,
|
92
|
+
@source_dir,
|
93
|
+
static_sandbox_root,
|
94
|
+
dynamic_sandbox_root,
|
95
|
+
static_sandbox.public_headers.root,
|
96
|
+
@spec,
|
97
|
+
@embedded,
|
98
|
+
@mangle,
|
99
|
+
@dynamic,
|
100
|
+
@config,
|
101
|
+
@bundle_identifier,
|
102
|
+
@exclude_deps,
|
103
|
+
@all_deps,
|
104
|
+
@black_deps,
|
105
|
+
@select_archs
|
77
106
|
)
|
78
107
|
|
79
|
-
builder.build(
|
108
|
+
builder.build(@package_type)
|
80
109
|
|
81
110
|
return unless @embedded
|
82
111
|
builder.link_embedded_resources
|
83
112
|
else
|
84
|
-
perform_build_t(platform,static_sandbox,dynamic_sandbox)
|
113
|
+
perform_build_t(platform,static_sandbox,dynamic_sandbox,static_installer)
|
85
114
|
end
|
86
115
|
end
|
87
116
|
|
@@ -2,7 +2,7 @@ require "fileutils"
|
|
2
2
|
|
3
3
|
module Pod
|
4
4
|
class Builder
|
5
|
-
|
5
|
+
#移动资源文件和静态库文件到build目录
|
6
6
|
def deal_target(path)
|
7
7
|
for item in @target_type_ext
|
8
8
|
if File.extname(path) == item
|
@@ -47,37 +47,12 @@ module Pod
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
alias build_library_t build_library
|
51
|
-
def build_library(platform, defines, output)
|
52
|
-
deal_target(@static_sandbox_root)
|
53
|
-
|
54
|
-
|
55
|
-
build_library_t platform,defines,output
|
56
|
-
end
|
57
|
-
|
58
|
-
alias ios_build_options_t ios_build_options
|
59
|
-
def ios_build_options
|
60
|
-
if @select_archs.size != 0
|
61
|
-
return "ARCHS=\'#{@select_archs.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
|
62
|
-
else
|
63
|
-
return "ARCHS=\'x86_64 i386 arm64 armv7\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
|
64
|
-
end
|
65
|
-
end
|
66
50
|
|
67
|
-
alias
|
68
|
-
def
|
69
|
-
|
70
|
-
return
|
71
|
-
else
|
72
|
-
UI.puts 'start build sim'
|
73
|
-
build_sim_libraries_t platform,defines
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
alias build_static_lib_for_ios_t build_static_lib_for_ios
|
78
|
-
def build_static_lib_for_ios(static_libs, _defines, output)
|
51
|
+
alias build_static_library_for_ios_t build_static_library_for_ios
|
52
|
+
def build_library(output)
|
53
|
+
deal_target(@static_sandbox_root)
|
79
54
|
if @all_deps
|
80
|
-
|
55
|
+
static_libs = static_libs_in_sandbox('build')
|
81
56
|
sim_libs = static_libs_in_sandbox('build-sim')
|
82
57
|
for item in @black_deps
|
83
58
|
static_libs.delete_if do |obj|
|
@@ -90,20 +65,46 @@ module Pod
|
|
90
65
|
UI.puts "links statics:#{static_libs.join(' ')}, sim_libs:#{sim_libs.join(' ')}"
|
91
66
|
`xcrun -r libtool -no_warning_for_no_symbols -static -o #{output} #{static_libs.join(' ')} #{sim_libs.join(' ')}`
|
92
67
|
else
|
93
|
-
|
68
|
+
build_static_library_for_ios output
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# alias ios_build_options_t ios_build_options
|
73
|
+
# def ios_build_options
|
74
|
+
# if @select_archs.size != 0
|
75
|
+
# return "ARCHS=\'#{@select_archs.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
|
76
|
+
# else
|
77
|
+
# return ios_build_options_t
|
78
|
+
# end
|
79
|
+
# end
|
80
|
+
alias ios_architectures_t ios_architectures
|
81
|
+
def ios_architectures
|
82
|
+
if @select_archs.size != 0
|
83
|
+
return @select_archs
|
84
|
+
else
|
85
|
+
return ios_architectures_t
|
94
86
|
end
|
95
|
-
|
87
|
+
end
|
88
|
+
|
89
|
+
alias build_sim_libraries_t build_sim_libraries
|
90
|
+
def build_sim_libraries(defines)
|
91
|
+
if @select_archs.size != 0 && !@select_archs.include?('i386') && !@select_archs.include?('x86_64')
|
92
|
+
return
|
93
|
+
else
|
94
|
+
UI.puts 'start build sim'
|
95
|
+
build_sim_libraries_t defines
|
96
|
+
end
|
96
97
|
end
|
97
98
|
|
98
99
|
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,
|
100
|
+
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,all_deps= false ,black_deps=[],select_archs=[])
|
100
101
|
@all_deps = all_deps
|
101
102
|
@black_deps = black_deps
|
102
103
|
@select_archs = select_archs
|
103
104
|
@target_type_ext = ['.a','.bundle']
|
104
105
|
@target_dir_ext_ext = "#{static_sandbox_root}/build"
|
105
106
|
@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)
|
107
|
+
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
108
|
end
|
108
109
|
end
|
109
110
|
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.21
|
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-
|
11
|
+
date: 2021-05-10 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.
|
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.
|
54
|
+
version: 1.5.1
|
55
55
|
description: A short description of cocoapods-packager-ext.
|
56
56
|
email:
|
57
57
|
- kyle.zhou@qq.com
|