tsantos-rakejava 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rakejava.rb +14 -1
  2. metadata +1 -1
@@ -198,7 +198,7 @@ module RakeJava
198
198
  class JarTask < Rake::Task
199
199
  include RakeJavaUtil
200
200
 
201
- attr_accessor :files, :main_class, :manifest
201
+ attr_accessor :files, :main_class, :manifest, :sign_info
202
202
 
203
203
  def initialize name, app
204
204
  super
@@ -241,6 +241,19 @@ module RakeJava
241
241
  puts cmd[0..max_cmd_len] + "..."
242
242
  end
243
243
  puts `#{cmd}`
244
+
245
+ # Now, sign the jar if we're asked to. This only supports the
246
+ # arguments that I need for my project at the moment.
247
+ if @sign_info
248
+ cmd = "jarsigner"
249
+ cmd << " -storetype #{@sign_info[:store_type]}"
250
+ cmd << " -keystore #{@sign_info[:key_store]}"
251
+ cmd << " -storepass #{@sign_info[:store_pass]}"
252
+ cmd << " #{@name}"
253
+ cmd << " #{@sign_info[:alias]}"
254
+ puts cmd
255
+ puts `#{cmd}`
256
+ end
244
257
  end
245
258
 
246
259
  protected
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tsantos-rakejava
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Santos