Class: Souyuz::ApkSignCommandGenerator
- Inherits:
-
Object
- Object
- Souyuz::ApkSignCommandGenerator
- Defined in:
- lib/souyuz/generators/apk_sign_command_generator.rb
Overview
Responsible for building the apksigner command
Class Method Summary collapse
- .detect_apksigner_executable ⇒ Object
- .generate ⇒ Object
- .options ⇒ Object
- .pipe ⇒ Object
- .prefix ⇒ Object
Class Method Details
.detect_apksigner_executable ⇒ Object
22 23 24 25 26 |
# File 'lib/souyuz/generators/apk_sign_command_generator.rb', line 22 def detect_apksigner_executable apksigner = File.join(Souyuz.config[:buildtools_path], 'apksigner') apksigner end |
.generate ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/souyuz/generators/apk_sign_command_generator.rb', line 5 def generate build_apk_path = Souyuz.cache[:build_apk_path] Souyuz.cache[:signed_apk_path] = "#{build_apk_path}-signed" parts = prefix parts << detect_apksigner_executable parts += parts << Souyuz.cache[:aligned_apk_path] parts += pipe parts end |
.options ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/souyuz/generators/apk_sign_command_generator.rb', line 28 def = [] << "sign" << "--verbose" if $verbose << "--ks \"#{Souyuz.config[:keystore_path]}\"" << "--ks-pass \"pass:#{Souyuz.config[:keystore_password]}\"" << "--ks-key-alias \"#{Souyuz.config[:keystore_alias]}\"" << "--out \"#{Souyuz.cache[:signed_apk_path]}\"" end |
.pipe ⇒ Object
40 41 42 43 44 |
# File 'lib/souyuz/generators/apk_sign_command_generator.rb', line 40 def pipe pipe = [] pipe end |
.prefix ⇒ Object
18 19 20 |
# File 'lib/souyuz/generators/apk_sign_command_generator.rb', line 18 def prefix [""] end |