cocoapods-fy-bin 0.1.1 → 0.1.4

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: 903d552160f64b602e42d047b1fe988fa929552de5367eec788a8504aa728f8f
4
- data.tar.gz: a4dea89c78f4f46bcdaf23727edc749985bcf005ad2e259d0fca24a6e66a6c73
3
+ metadata.gz: 1cde9c2113365214bafc0dc783ae238b2547753c74c7f53541ff4f780b11608b
4
+ data.tar.gz: fcd9346532f14f66642cf518c0ad66ec373e269d5c7a246823d57bb9289966d7
5
5
  SHA512:
6
- metadata.gz: 63973a62bbe459379dd395d2115c063839d4dce25c9262f4809ab00cd1a17623f664965a972ffd1ef26322c550d07717db84a471d75bd8e53f92836d39aa777d
7
- data.tar.gz: 82f61369e2eaa1159b8f13bb51fb12b1c033c13ed6e86cfbe68d1caf18af0a6d6cac7da9eb7cb80dcc17d22cc5e265435709e0a930057e66cd27936b653d8a42
6
+ metadata.gz: 852a379929907b914d0f5af1b92211e03b8bceb174a8d160705cd22c1d158ecf63f7c9df0bf0bd168c365e9d09bd79e7f63d7fb97939d11a8623bb1b18a1f91c
7
+ data.tar.gz: 54cff8f722c75f1bb9e9836ffe16e55022cdf1ddace2e568824d84678168c8db4abf388f1a3938df16fbaec28ebc29db028ec5bb1ca0119ad933b3c3d0e49553
@@ -32,7 +32,8 @@ module Pod
32
32
  ['--configuration', 'Build the specified configuration (e.g. Debug). Defaults to Release'],
33
33
  ['--env', "该组件上传的环境 %w[debug release]"],
34
34
  ['--archs', "需要二进制组件的架构"],
35
- ['--pre_build_shell', "xcodebuild前的脚本命令"]
35
+ ['--pre_build_shell', "xcodebuild前的脚本命令"],
36
+ ['--toolchain', "设置toolchain"]
36
37
  ].concat(Pod::Command::Gen.options).concat(super).uniq
37
38
  end
38
39
 
@@ -56,6 +57,7 @@ module Pod
56
57
  @platform = Platform.new(:ios)
57
58
  @archs = argv.option('archs', 'armv7,arm64')
58
59
  @pre_build_shell = argv.option('pre_build_shell') || ''
60
+ @toolchain = argv.option('toolchain') || ''
59
61
  @config = argv.option('configuration', 'Release')
60
62
 
61
63
  @framework_path
@@ -91,6 +93,7 @@ module Pod
91
93
  @spec,
92
94
  @archs,
93
95
  @pre_build_shell,
96
+ @toolchain,
94
97
  CBin::Config::Builder.instance.white_pod_list.include?(@spec.name),
95
98
  @config)
96
99
  builder.build
@@ -22,7 +22,8 @@ module Pod
22
22
  ['--configuration', 'Build the specified configuration (e.g. Release ). Defaults to Debug'],
23
23
  ['--env', "该组件上传的环境 %w[debug release]"],
24
24
  ['--archs', "需要二进制组件的架构"],
25
- ['--pre_build_shell', "xcodebuild前的脚本命令"]
25
+ ['--pre_build_shell', "xcodebuild前的脚本命令"],
26
+ ['--toolchain', "设置toolchain"]
26
27
  ].concat(Pod::Command::Gen.options).concat(super).uniq
27
28
  end
28
29
 
@@ -41,6 +42,7 @@ module Pod
41
42
  @verbose = argv.flag?('verbose', true)
42
43
  @archs = argv.flag?('archs', 'arm64')
43
44
  @pre_build_shell = argv.option('pre_build_shell') || ''
45
+ @toolchain = argv.option('toolchain') || ''
44
46
  @config = argv.option('configuration', 'Debug')
45
47
  @additional_args = argv.remainder!
46
48
 
@@ -131,6 +133,9 @@ module Pod
131
133
  if @pre_build_shell
132
134
  argvs += ["--pre_build_shell=#{@pre_build_shell}"]
133
135
  end
136
+ if @toolchain
137
+ argvs += ["--toolchain=#{@toolchain}"]
138
+ end
134
139
  argvs += ["--configuration=#{@config}"]
135
140
 
136
141
  archive = Pod::Command::Bin::Archive.new(CLAide::ARGV.new(argvs))
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
 
6
6
  module Pod
@@ -21,6 +21,7 @@ module CBin
21
21
  rootSpec,
22
22
  archs,
23
23
  pre_build_shell,
24
+ toolchain,
24
25
  skip_archive = false,
25
26
  build_model="Release")
26
27
  @spec = spec
@@ -30,6 +31,7 @@ module CBin
30
31
  @isRootSpec = rootSpec.name == spec.name
31
32
  @archs = archs
32
33
  @pre_build_shell = pre_build_shell
34
+ @toolchain = toolchain
33
35
  @skip_archive = skip_archive
34
36
  @framework_output = framework_output
35
37
  @zip = zip
@@ -58,7 +60,7 @@ module CBin
58
60
  source_dir = Dir.pwd
59
61
  file_accessor = Sandbox::FileAccessor.new(Pathname.new('.').expand_path, @spec.consumer(@platform))
60
62
  Dir.chdir(workspace_directory) do
61
- builder = CBin::Framework::Builder.new(@spec, file_accessor, @platform, source_dir, @archs, @pre_build_shell, @isRootSpec, @build_model)
63
+ builder = CBin::Framework::Builder.new(@spec, file_accessor, @platform, source_dir, @archs, @pre_build_shell, @toolchain, @isRootSpec, @build_model)
62
64
  @@build_defines = builder.build if @isRootSpec
63
65
  begin
64
66
  @framework_path = builder.lipo_build(@@build_defines) unless @skip_archive
@@ -10,7 +10,7 @@ module CBin
10
10
  class Builder
11
11
  include Pod
12
12
  #Debug下还待完成
13
- def initialize(spec, file_accessor, platform, source_dir, archs, pre_build_shell, isRootSpec = true, build_model="Debug")
13
+ def initialize(spec, file_accessor, platform, source_dir, archs, pre_build_shell, toolchain, isRootSpec = true, build_model="Debug")
14
14
  @spec = spec
15
15
  @source_dir = source_dir
16
16
  @file_accessor = file_accessor
@@ -19,6 +19,7 @@ module CBin
19
19
  @isRootSpec = isRootSpec
20
20
  @archs = archs
21
21
  @pre_build_shell = pre_build_shell
22
+ @toolchain = toolchain
22
23
  #vendored_static_frameworks 只有 xx.framework 需要拼接为 xx.framework/xx by slj
23
24
  vendored_static_frameworks = file_accessor.vendored_static_frameworks.map do |framework|
24
25
  path = framework
@@ -171,7 +172,9 @@ module CBin
171
172
  defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'"
172
173
  defines += " SWIFT_ACTIVE_COMPILATION_CONDITIONS='$(inherited)' "
173
174
  defines += @spec.consumer(@platform).compiler_flags.join(' ')
174
-
175
+ unless @toolchain.empty? then
176
+ defines += "-toolchain \"#{@toolchain}\""
177
+ end
175
178
  options = ios_build_options
176
179
  # if is_debug_model
177
180
  archs = ios_architectures
@@ -204,6 +207,7 @@ module CBin
204
207
 
205
208
  # 编译前需执行的的shell脚本
206
209
  def pre_build_command
210
+ unless @pre_build_shell.empty? then
207
211
  command = "sh #{@pre_build_shell}"
208
212
  puts command
209
213
  UI.message "command = #{command}"
@@ -218,15 +222,16 @@ module CBin
218
222
 
219
223
  Process.exit
220
224
  end
225
+ end
221
226
  end
222
227
 
223
228
  def xcodebuild(defines = '', args = '', build_dir = 'build', build_model = 'Debug')
224
229
 
225
230
  unless File.exist?("Pods.xcodeproj") #cocoapods-generate v2.0.0
226
- command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{File.join(File.expand_path("..", build_dir), File.basename(build_dir))} clean build -configuration #{build_model} -target #{target_name} -project ./Pods/Pods.xcodeproj 2>&1"
231
+ command = "sudo xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{File.join(File.expand_path("..", build_dir), File.basename(build_dir))} clean build -configuration #{build_model} -target #{target_name} -project ./Pods/Pods.xcodeproj 2>&1"
227
232
  puts command
228
233
  else
229
- command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{build_model} -target #{target_name} -project ./Pods.xcodeproj 2>&1"
234
+ command = "sudo xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{build_model} -target #{target_name} -project ./Pods.xcodeproj 2>&1"
230
235
  puts command
231
236
  end
232
237
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-fy-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dr