Sha256: 36d8fb04d92d5b4c0fa443fed0ff560dfe43bdedf69095e1cc1bdb8ffe961048

Contents?: true

Size: 776 Bytes

Versions: 15

Compression:

Stored size: 776 Bytes

Contents

require 'ant'
require 'fileutils'
include FileUtils

TARGET_DIR = 'target'
LIBS_DIR = 'trinidad-libs'
JAR_NAME = 'trinidad-daemon-extension.jar'

namespace :ant do
  desc 'Clean the java target directory'
  task :clean do
    rm_f TARGET_DIR
    rm_f "#{LIBS_DIR}/#{JAR_NAME}"
  end

  desc 'Compile the java classes'
  task :compile => :clean do
    opts = {
      :fork => 'true',
      :failonerror => 'true',
      :srcdir => 'src/main/java',
      :destdir => TARGET_DIR,
      :classpath => Dir.glob('trinidad-libs/*.jar').join(':')
    }

    mkdir_p TARGET_DIR
    ant.javac(opts)
  end

  desc 'Create the jar file'
  task :build => :compile do
    opts = {
      :destfile => "#{LIBS_DIR}/#{JAR_NAME}",
      :basedir => TARGET_DIR
    }
    ant.jar(opts)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
trinidad_daemon_extension-0.2.10 rakelib/build.rake
trinidad_daemon_extension-0.2.9 rakelib/build.rake
trinidad_daemon_extension-0.2.8 rakelib/build.rake
trinidad_daemon_extension-0.2.7 rakelib/build.rake
trinidad_daemon_extension-0.2.6 rakelib/build.rake
trinidad_daemon_extension-0.2.5 rakelib/build.rake
trinidad_daemon_extension-0.2.4 rakelib/build.rake
trinidad_daemon_extension-0.2.3 rakelib/build.rake
trinidad_daemon_extension-0.2.2 rakelib/build.rake
trinidad_daemon_extension-0.2.1 rakelib/build.rake
trinidad_daemon_extension-0.2.0 rakelib/build.rake
trinidad_daemon_extension-0.1.5 rakelib/build.rake
trinidad_daemon_extension-0.1.4 rakelib/build.rake
trinidad_daemon_extension-0.1.3 rakelib/build.rake
trinidad_daemon_extension-0.1.2 rakelib/build.rake