-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
51 lines (45 loc) · 1.24 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require_relative 'lib/jruby_art/version'
# @TODO change download source for jruby-complete
def create_manifest
title = 'Implementation-Title: rpextras (java extension for JRubyArt) '
version = format('Implementation-Version: %s', JRubyArt::VERSION)
end
task default: [:init, :compile, :gem, :test]
desc 'Create Manifest'
task :init do
create_manifest
end
desc 'Build gem'
task :gem do
sh 'gem build jruby_art.gemspec'
end
desc 'Compile'
task :compile do
sh 'mvn package'
sh 'mv target/rpextras.jar lib'
end
desc 'Test'
task :test do
sh 'jruby --dev test/deglut_spec_test.rb'
sh 'jruby --dev test/vecmath_spec_test.rb'
sh 'jruby --dev test/math_tool_test.rb'
sh 'jruby --dev test/helper_methods_test.rb'
sh 'jruby --dev test/aabb_spec_test.rb'
sh 'jruby --dev test/create_test.rb'
sh 'jruby --dev test/color_group_test.rb'
home = File.expand_path('~')
config = File.exist?(format('%s/.jruby_art/config.yml', home))
if config
ruby 'test/k9_run_test.rb'
else
warn format('You should create %s/.jruby_art/config.yml to run sketch tests', home)
end
end
desc 'clean'
task :clean do
Dir["./**/*.{jar,gem}"].each do |path|
puts "Deleting #{path} ..."
File.delete(path)
end
FileUtils.rm_rf('./target')
end