forked from emboss/krypt-core-java
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
44 lines (33 loc) · 920 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
34
35
36
37
38
39
40
41
42
43
44
require 'rake'
require 'rake/testtask'
require 'rspec/core/rake_task'
require 'ant'
KRYPT_HOME = '../krypt'
# TODO: update
MANIFEST = FileList["Rakefile", "Manifest.txt", "README.rdoc", "LICENSE", "lib/**/*"]
File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f.puts n } }
task :default => [:build, :spec]
file "lib/krypt/kryptcore.jar" => :build
desc "Delete artifact files"
task :clean do
rm_f FileList['lib/krypt/kryptcore.jar']
ant :clean
end
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.ruby_opts = ['--1.9']
spec.pattern = File.join(KRYPT_HOME, 'spec/**/*_spec.rb')
spec.fail_on_error = false
end
task :pre_coverage do
ant 'coverage-jar'
end
task :post_coverage do
ant 'coverage-report'
end
desc "Create coverage report of spec run"
task :coverage => [:clean, :pre_coverage, :spec, :post_coverage]
desc "Build a JAR file"
task :build do
ant 'jar'
end
task :java_compile => :build