class Gem::Tasks::Build::Task

def build(path,gemspec)

Other tags:
    Abstract: -

Parameters:
  • gemspec (Gem::Specification) --
  • path (String) --
def build(path,gemspec)
end

def build_task(name,extname=name)

def build_task(name,extname=name)
  directory Project::PKG_DIR
  @project.builds.each do |build,packages|
    namespace :build do
      namespace name do
        gemspec = @project.gemspecs[build]
        path    = packages[extname]
        # define file tasks, so the packages are not needless re-built
        file(path => [Project::PKG_DIR, *gemspec.files]) do
          status "Building #{File.basename(path)} ..."
          build(path,gemspec)
        end
        task build => path
      end
    end
    task "build:#{build}" => "build:#{name}:#{build}"
  end
  gemspec_tasks "build:#{name}"
  desc "Builds all packages" unless task?(:build)
  task :build => "build:#{name}"
end