diff options
author | Luis Lavena <luislavena@gmail.com> | 2011-06-08 00:33:50 -0400 |
---|---|---|
committer | Luis Lavena <luislavena@gmail.com> | 2011-06-08 00:33:50 -0400 |
commit | 83d8702cff14fbcee14b36109e1e43ae9d91df92 (patch) | |
tree | fffcf2b6667ef2c9e2aa82ce28a023b5c32d41f3 | |
parent | d9078a854bb94dbabbb0a2846b600db03429067d (diff) | |
download | rake-compiler-0.7.9.tar.gz |
Use Gem::PackageTask consistently also on JavaExtensionTaskv0.7.9
-rw-r--r-- | lib/rake/javaextensiontask.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rake/javaextensiontask.rb b/lib/rake/javaextensiontask.rb index a13f353..e6c4fa3 100644 --- a/lib/rake/javaextensiontask.rb +++ b/lib/rake/javaextensiontask.rb @@ -134,9 +134,10 @@ execute the Rake compilation task using the JRuby interpreter. if @gem_spec && !Rake::Task.task_defined?("java:#{@gem_spec.name}") task "java:#{@gem_spec.name}" do |t| - - # FIXME: truly duplicate the Gem::Specification + # FIXME: workaround Gem::Specification limitation around cache_file: + # http://github.com/rubygems/rubygems/issues/78 spec = gem_spec.dup + spec.instance_variable_set(:"@cache_file", nil) if spec.respond_to?(:cache_file) # adjust to specified platform spec.platform = Gem::Platform.new('java') @@ -161,7 +162,7 @@ execute the Rake compilation task using the JRuby interpreter. end # Generate a package for this gem - gem_package = Rake::GemPackageTask.new(spec) do |pkg| + Gem::PackageTask.new(spec) do |pkg| pkg.need_zip = false pkg.need_tar = false end |