summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-04-29 12:35:17 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-04-29 12:35:17 -0700
commit0503403c3b6db8ee1907e279946833133396c9a9 (patch)
tree78d56bbd453649fd606307e308c4b7cf6fcebb47 /Rakefile
parent07c95f862b7cedfae0706aa9aa32bf627673f151 (diff)
downloadpsych-0503403c3b6db8ee1907e279946833133396c9a9.tar.gz
don't add the jar file to the manifest
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 15c7b7c..133aa6a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -64,7 +64,25 @@ $hoe = Hoe.spec 'psych' do
end
end
end
-$hoe.spec.files << 'lib/psych.jar'
+
+def gem_build_path
+ File.join 'pkg', $hoe.spec.full_name
+end
+
+def add_file_to_gem relative_path
+ target_path = File.join gem_build_path, relative_path
+ target_dir = File.dirname(target_path)
+ mkdir_p target_dir unless File.directory?(target_dir)
+ rm_f target_path
+ safe_ln relative_path, target_path
+ $hoe.spec.files.concat [relative_path]
+end
+
+if java?
+ task gem_build_path => [:compile] do
+ add_file_to_gem 'lib/psych.jar'
+ end
+end
Hoe.add_include_dirs('.:lib/psych')