1 task :default => [:build]
3 Object.const_set(:BASE_DIR, Dir.pwd)
5 File.open("default.build.properties") do |props|
6 props.each_line do |line|
8 next if line =~ /^\W*#/
11 name, value = line.split("=")
12 name.gsub!(".", "_").upcase!
13 Object.const_set(name.to_sym, value)
15 # substitute embedded props
16 value.chop!.gsub!(/\$\{([^}]+)\}/) do |embed|
17 Object.const_get($1.gsub!(".", "_").upcase!)
23 system "ant -logger org.apache.tools.ant.NoBannerLogger #{args.join(' ')}"
32 desc "Alias for test:short"
33 task :test => "test:short"
35 desc "Alias for spec:ci"
36 task :spec => "spec:ci"
39 desc "Compile test code"
42 system "jar cf build/jruby-test-classes.jar -C build/classes/test ."
45 desc "Run the basic set of tests"
50 desc "Run the complete set of tests (will take a while)"
55 desc "Run tracing tests (do not forget to pass --debug)"
57 require 'rake/testtask'
58 Rake::TestTask.new('test:tracing') do |t|
59 t.pattern = 'test/tracing/test_*.rb'
65 file "build/jruby-test-classes.jar" do
66 Rake::Task['test:compile'].invoke
70 desc "Run the rubyspecs expected to pass (version-frozen)"
75 desc "Run all the specs including failures (version-frozen)"
80 require 'spec/rake/spectask'
81 desc "Runs Java Integration Specs"
82 Spec::Rake::SpecTask.new("ji" => "build/jruby-test-classes.jar") do |t|
84 t.spec_opts << "--options" << "spec/java_integration/spec.opts"
85 t.spec_files = FileList['spec/java_integration/**/*_spec.rb']
88 desc "Runs Compiler Specs"
89 Spec::Rake::SpecTask.new("compiler" => "build/jruby-test-classes.jar") do |t|
90 t.spec_files = FileList['spec/compiler/**/*_spec.rb']
94 desc "Clean all built output"
96 delete_files = FileList.new do |fl|
98 include("#{BUILD_DIR}/**").
99 exclude("#{BUILD_DIR}/rubyspec").
101 include(API_DOCS_DIR)
104 delete_files.each {|files| rm_rf files, :verbose => true}
107 desc "Generate sources, compile and add to jar file"
110 system 'apt -nocompile -cp lib/jruby.jar:build_lib/asm-3.0.jar:build_lib/asm-util-3.0.jar -factory org.jruby.anno.AnnotationBinder src/org/jruby/*.java'
111 system 'javac -cp lib/jruby.jar src_gen/*.java'
112 system 'jar -uf lib/jruby.jar -C src_gen .'