class Souyuz::JavaSignCommandGenerator
Responsible for building the jarsigner command
Public Class Methods
detect_jarsigner_executable()
click to toggle source
# File lib/souyuz/generators/java_sign_command_generator.rb, line 23 def detect_jarsigner_executable jarsigner = ENV['JAVA_HOME'] ? File.join(ENV['JAVA_HOME'], 'bin', 'jarsigner') : 'jarsigner' jarsigner end
generate()
click to toggle source
# File lib/souyuz/generators/java_sign_command_generator.rb, line 5 def generate build_apk_path = Souyuz.cache[:build_apk_path] Souyuz.cache[:signed_apk_path] = "#{build_apk_path}-unaligned" parts = prefix parts << detect_jarsigner_executable parts += options parts << build_apk_path parts << Souyuz.config[:keystore_alias] parts += pipe parts end
options()
click to toggle source
# File lib/souyuz/generators/java_sign_command_generator.rb, line 29 def options config = Souyuz.config options = [] options << "-verbose" if $verbose options << "-sigalg MD5withRSA" options << "-digestalg SHA1" options << "-storepass \"#{config[:keystore_password]}\"" options << "-keystore \"#{config[:keystore_path]}\"" options << "-tsa #{config[:keystore_tsa]}" options << "-signedjar \"#{Souyuz.cache[:signed_apk_path]}\"" options end
pipe()
click to toggle source
# File lib/souyuz/generators/java_sign_command_generator.rb, line 44 def pipe pipe = [] pipe end
prefix()
click to toggle source
# File lib/souyuz/generators/java_sign_command_generator.rb, line 19 def prefix [""] end