Class: CBin::LocalFramework::Builder
- Inherits:
-
Object
- Object
- CBin::LocalFramework::Builder
- Includes:
- Pod
- Defined in:
- lib/cocoapods-imy-bin/helpers/local/local_framework_builder.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(spec, file_accessor, platform, local_build_dir_name, local_build_dir, is_library = true, framework_BuildProductsPath = "") ⇒ Builder
constructor
Debug下还待完成.
Methods included from Pod
Constructor Details
#initialize(spec, file_accessor, platform, local_build_dir_name, local_build_dir, is_library = true, framework_BuildProductsPath = "") ⇒ Builder
Debug下还待完成
15 16 17 18 19 20 21 22 23 |
# File 'lib/cocoapods-imy-bin/helpers/local/local_framework_builder.rb', line 15 def initialize(spec, file_accessor, platform, local_build_dir_name, local_build_dir, is_library = true, framework_BuildProductsPath = "") @spec = spec @file_accessor = file_accessor @platform = platform @local_build_dir_name = local_build_dir_name @local_build_dir = local_build_dir @is_library = is_library @framework_BuildProductsPath = framework_BuildProductsPath end |
Instance Method Details
#create ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/cocoapods-imy-bin/helpers/local/local_framework_builder.rb', line 25 def create begin #如果是.a 文件, 或者 swift下,是.a文件的 if @is_library || (!@is_library && @framework_BuildProductsPath != framework_name) UI.section("Building static library #{@spec}") do output = framework.versions_path + Pathname.new(@spec.name) build_static_library_for_ios(output) res = copy_headers # maybe fails for copy_headers if res copy_resources cp_to_source_dir else FileUtils.remove_dir(framework.fwk_path) if File.exist?(framework.fwk_path) return nil end end else UI.section("Building static framework #{@spec}") do output = File.join(CBin::Config::Builder.instance.zip_dir,"#{@spec.name}.framework") build_static_framework_for_ios(output) end end rescue StandardError UI.warn "【#{spec.name} | #{spec.version}】组件二进制版本组装失败 ." end framework end |