Class: CBin::LocalLibrary::Builder

Inherits:
Object
  • Object
show all
Includes:
Pod
Defined in:
lib/cocoapods-imy-bin/helpers/local/local_library_builder.rb

Instance Method Summary collapse

Methods included from Pod

match_version?

Constructor Details

#initialize(spec, file_accessor, platform, source_dir, framework_path) ⇒ Builder

Returns a new instance of Builder.



16
17
18
19
20
21
22
23
24
# File 'lib/cocoapods-imy-bin/helpers/local/local_library_builder.rb', line 16

def initialize(spec, file_accessor, platform, source_dir,framework_path)
  @spec = spec
  @source_dir = source_dir
  @file_accessor = file_accessor
  @platform = platform
  @framework = framework_path
  @source_files = "#{@source_dir}/#{library.name_path}"
  @source_zip_file = "#{@source_files}.zip"
end

Instance Method Details

#buildObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/cocoapods-imy-bin/helpers/local/local_library_builder.rb', line 26

def build
  UI.section("Building static library #{@spec}") do

    begin
      clean_source_dir
      copy_headers
      copy_library
      copy_resources
      cp_to_source_dir
    rescue Exception => e
      puts e.message
      puts e.backtrace.inspect
    end

  end
end