Sha256: 33752358e50450ba22654103474bc38231eb62b0e89c5c15055397658bf400de

Contents?: true

Size: 785 Bytes

Versions: 15

Compression:

Stored size: 785 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.repository.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)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
xcake-0.6.19 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.18 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.17 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.16 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.14 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.13 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.12 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.11 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.10 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.9 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.8 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.7 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.6 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.5 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb
xcake-0.6.4 lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb