Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 642 Bytes
require 'ant'
directory "pkg/classes"
desc "Clean up build artifacts"
task :clean do
rm_rf "pkg/classes"
rm_rf "lib/refqueue.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/refqueue.jar", :includes => "**/*.class"
end
task :package => :jar
desc "Run the specs"
task :spec => :jar do
ruby "-S", "spec", "spec"
end