-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
48 lines (40 loc) · 1007 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
45
46
47
48
require_relative 'lib/joonsrenderer/version'
def create_manifest
title = 'Implementation-Title: joonsrenderer (java extension for joonsrenderer gem)'
version = format('Implementation-Version: %s', JoonsRenderer::VERSION)
file = File.open('MANIFEST.MF', 'w') do |f|
f.puts(title)
f.puts(version)
f.puts('Class-Path: janino-3.1.3.jar commons-compiler-3.1.3.jar')
end
end
task default: [:init, :compile, :install, :gem]
desc 'Create Manifest'
task :init do
create_manifest
end
desc 'Build gem'
task :gem => [:install, :compile] do
sh "gem build joonsrenderer.gemspec"
end
desc 'Compile'
task :compile => [:init] do
sh "mvn package"
end
desc 'Install'
task :install do
sh "mvn dependency:copy"
sh "mv target/joonsrenderer.jar lib"
end
desc 'JDeps Tool'
task :jdeps do
system 'mvn jdeps:jdkinternals'
end
desc 'clean'
task :clean do
Dir['./**/*.%w{jar gem}'].each do |path|
puts "Deleting #{path} ..."
File.delete(path)
end
FileUtils.rm_rf('./target')
end