Sha256: 54fae19aa24447d09d492c2c0fc185bda78e7ef345d9efb1aace15995584c58b

Contents?: true

Size: 791 Bytes

Versions: 6

Compression:

Stored size: 791 Bytes

Contents

module Xcake
  # This build phase generator detects
  # files and adds them to the copy resources phase.
  #
  # Note: This installer is always the last to be executed.
  class CopyResourcesFileReferenceInstaller < FileReferenceInstaller
    def self.dependencies
      FileReferenceInstaller.descendants.select do |i|
        i != self
      end
    end

    def self.can_install_node(node)
      extension = File.extname(node.path)
      (!File.directory?(node.path) ||
        (File.directory?(node.path) &&
            !['.xcassets', '.xcdatamodeld', '.lproj'].include?(extension) &&
            node.children.count == 0))
    end

    def add_file_reference_to_target(file_reference, target)
      target.resources_build_phase.add_file_reference(file_reference, true)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xcake-0.6.25 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.24 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.23 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.22 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.21 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.20 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb