Sha256: 8d02b0254039702e9eaee093f9beaee62fa7c04fd22a5493e7439379ee999779

Contents?: true

Size: 834 Bytes

Versions: 4

Compression:

Stored size: 834 Bytes

Contents

require 'rake_factory'
require 'ruby_leiningen'
require 'ruby_leiningen/plugins'

require_relative '../mixins/directoried'

module RakeLeiningen
  module Tasks
    class Build < RakeFactory::Task
      include Mixins::Directoried

      default_name :build
      default_description "Build standalone uberjar."
      default_prerequisites ->(t) {
        t.ensure_task_name ? [t.ensure_task_name] : []
      }

      parameter :main_namespace
      parameter :profile

      parameter :directory, default: '.'

      parameter :ensure_task_name, default: 'leiningen:ensure'

      action do |t|
        puts "Building standalone uberjar..."

        in_directory(t.directory) do
          RubyLeiningen.uberjar(
              main_namespace: t.main_namespace,
              profile: t.profile)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rake_leiningen-0.12.0 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.11.0.pre.1 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.10.0 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.9.0.pre.1 lib/rake_leiningen/tasks/build.rb