forked from ondra-m/ruby-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
35 lines (28 loc) · 623 Bytes
/
Rakefile
File metadata and controls
35 lines (28 loc) · 623 Bytes
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
34
35
#-*- mode: ruby -*-
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new
task default: :spec
task test: :spec
def java?
RUBY_PLATFORM =~ /java/
end
if java?
require "rake/javaextensiontask"
Rake::JavaExtensionTask.new("ruby_java") do |ext|
ext.name = "ruby_spark_ext"
end
else
require "rake/extensiontask"
Rake::ExtensionTask.new("ruby_c") do |ext|
ext.name = "ruby_spark_ext"
end
end
task :clean do
Dir['lib/*.{jar,o,so}'].each do |path|
puts "Deleting #{path} ..."
File.delete(path)
end
FileUtils.rm_rf('./pkg')
FileUtils.rm_rf('./tmp')
end