Sha256: 566e7848b73a819604ae3b3a0b73d471991adc712a5902a01e10d714e1c565f6

Contents?: true

Size: 981 Bytes

Versions: 17

Compression:

Stored size: 981 Bytes

Contents

# frozen_string_literal: true

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(RakeFactory::DynamicValue.new do |t|
        t.ensure_task_name ? [t.ensure_task_name] : []
      end)

      parameter :main_namespace
      parameter :profile
      parameter :environment

      parameter :directory, default: '.'

      parameter :ensure_task_name, default: 'leiningen:ensure'

      action do |t|
        $stdout.puts 'Building standalone uberjar...'

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rake_leiningen-0.39.0.pre.2 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.39.0.pre.1 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.38.0 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.37.0.pre.7 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.37.0.pre.6 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.37.0.pre.5 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.37.0.pre.4 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.37.0.pre.3 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.37.0.pre.2 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.37.0.pre.1 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.36.0 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.35.0.pre.2 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.35.0.pre.1 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.34.0 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.33.0.pre.5 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.33.0.pre.4 lib/rake_leiningen/tasks/build.rb
rake_leiningen-0.33.0.pre.3 lib/rake_leiningen/tasks/build.rb