oga/Rakefile

40 lines
764 B
Ruby
Raw Normal View History

2014-02-26 18:50:16 +00:00
require 'bundler/gem_tasks'
require 'digest/sha2'
require 'rake/clean'
GEMSPEC = Gem::Specification.load('oga.gemspec')
if RUBY_PLATFORM == 'java'
require 'rake/javaextensiontask'
Rake::JavaExtensionTask.new('liboga', GEMSPEC) do |task|
task.ext_dir = 'ext/java'
end
else
require 'rake/extensiontask'
Rake::ExtensionTask.new('liboga', GEMSPEC) do |task|
task.ext_dir = 'ext/c'
end
end
CLEAN.include(
'coverage',
'yardoc',
2014-06-01 21:02:28 +00:00
'lib/oga/xml/parser.rb',
2014-05-14 06:48:49 +00:00
'lib/oga/xpath/lexer.rb',
2014-06-01 21:02:28 +00:00
'lib/oga/xpath/parser.rb',
'benchmark/fixtures/big.xml',
'profile/samples/**/*.txt',
'lib/liboga.*',
'tmp',
'ext/c/lexer.c',
'ext/java/org/liboga/xml/Lexer.java'
)
2014-02-26 18:50:16 +00:00
Dir['./task/*.rake'].each do |task|
import(task)
end
task :default => :test