-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathRakefile
33 lines (29 loc) · 796 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'bundler/gem_tasks'
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/**/*_test.rb']
end
gemspec = Gem::Specification.load(File.expand_path('xorcist.gemspec', __FILE__))
if RUBY_ENGINE == 'jruby'
require 'rake/javaextensiontask'
Rake::JavaExtensionTask.new('xorcist', gemspec) do |ext|
ext.release = '8'
end
task :default => [:compile, :test]
else
require 'rake/extensiontask'
Rake::ExtensionTask.new('xorcist', gemspec) do |ext|
ext.lib_dir = 'lib/xorcist'
end
task :default => [:compile, :test]
end
task :clean do
Dir['./**/*.{bundle,jar,o,so}'].each do |path|
puts "Deleting #{path} ..."
File.delete(path)
end
FileUtils.rm_rf('./pkg')
FileUtils.rm_rf('./tmp')
end