lib/cocoapods-binaryhqp/Main.rb in cocoapods-binaryhqp-0.4.9 vs lib/cocoapods-binaryhqp/Main.rb in cocoapods-binaryhqp-0.5.0

- old
+ new

@@ -1,9 +1,10 @@ # encoding: UTF-8 require_relative 'helper/podfile_options' require_relative 'tool/tool' require_relative 'gem_version' +require_relative 'command_option/command_option' module Pod class Podfile module DSL @@ -11,10 +12,14 @@ # it has a lower priority to other binary settings def all_binary! DSL.prebuild_all = true end + def all_source! + DSL.framework_source_all = true + end + # Enable bitcode for prebuilt frameworks def enable_bitcode_for_prebuilt_frameworks! DSL.bitcode_enabled = true end @@ -58,10 +63,13 @@ private class_attr_accessor :prebuild_all prebuild_all = false + class_attr_accessor :framework_source_all + framework_source_all = false + class_attr_accessor :bitcode_enabled bitcode_enabled = false class_attr_accessor :dont_remove_source_code dont_remove_source_code = false @@ -120,10 +128,13 @@ Pod.is_prebuild_stage = true Pod::Podfile::DSL.enable_prebuild_patch true # enable sikpping for prebuild targets Pod::Installer.force_disable_integration true # don't integrate targets Pod::Config.force_disable_write_lockfile true # disbale write lock file for perbuild podfile Pod::Installer.disable_install_complete_message true # disable install complete message + + Pod::Podfile::DSL.framework_source_all = Pod::Podfile::DSL.framework_source_all || Pod::Command::Install::all_use_source + Pod::UI.puts("全部使用源码") if Pod::Podfile::DSL.framework_source_all # make another custom sandbox standard_sandbox = installer_context.sandbox prebuild_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(standard_sandbox) @@ -132,11 +143,11 @@ # install lockfile = installer_context.lockfile binary_installer = Pod::Installer.new(prebuild_sandbox, prebuild_podfile, lockfile) - binary_installer.delete_standard_sand_box_pod(standard_sandbox) - + binary_installer.delete_all_standard_sandbox_pod(standard_sandbox) + if binary_installer.have_exact_prebuild_cache? && !update binary_installer.install_when_cache_hit! else binary_installer.update = update binary_installer.repo_update = repo_update