Sha256: 35d8945e5603845f48fe4018619bc3389d95300bf4722a7cb38ea28939d3c13a

Contents?: true

Size: 1.27 KB

Versions: 13

Compression:

Stored size: 1.27 KB

Contents

require "bundler/gem_tasks"
require "rake/testtask"

task :default => :test

if defined?(JRUBY_VERSION)
  require "ant"

  directory "pkg/classes"
  directory 'pkg/tests'

  desc "Clean up build artifacts"
  task :clean do
    rm_rf "pkg/classes"
    rm_rf "pkg/tests"
    rm_rf "lib/thread_safe/jruby_cache_backend.jar"
  end

  desc "Compile the extension"
  task :compile => "pkg/classes" do |t|
    ant.javac :srcdir => "ext", :destdir => t.prerequisites.first,
      :source => "1.5", :target => "1.5", :debug => true,
      :classpath => "${java.class.path}:${sun.boot.class.path}"
  end

  desc "Build the jar"
  task :jar => :compile do
    ant.jar :basedir => "pkg/classes", :destfile => "lib/thread_safe/jruby_cache_backend.jar", :includes => "**/*.class"
  end

  desc "Build test jar"
  task 'test-jar' => 'pkg/tests' do |t|
    ant.javac :srcdir => 'test/src', :destdir => t.prerequisites.first,
      :source => "1.5", :target => "1.5", :debug => true

    ant.jar :basedir => 'pkg/tests', :destfile => 'test/package.jar', :includes => '**/*.class'
  end

  task :package => [ :jar, 'test-jar' ]
else
  # No need to package anything for non-jruby rubies
  task :package
end

Rake::TestTask.new :test => :package do |t|
  t.libs << "lib"
  t.test_files = FileList["test/**/*.rb"]
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
nanumfont-rails-0.1 vendor/bundle/ruby/2.1.0/gems/thread_safe-0.3.4/Rakefile
whos_dated_who-0.1.0 vendor/bundle/gems/thread_safe-0.3.4/Rakefile
whos_dated_who-0.0.1 vendor/bundle/gems/thread_safe-0.3.4/Rakefile
thread_safe-0.3.4 Rakefile
thread_safe-0.3.4-java Rakefile
thread_safe-0.3.3-java Rakefile
thread_safe-0.3.3 Rakefile
thread_safe-0.3.2-java Rakefile
thread_safe-0.3.2 Rakefile
thread_safe-0.3.1 Rakefile
thread_safe-0.3.1-java Rakefile
thread_safe-0.2.0-java Rakefile
thread_safe-0.2.0 Rakefile