Skip to content

Commit

Permalink
[ADD] options to zipalign command
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherney committed Sep 7, 2020
1 parent dd47b59 commit 11c74b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -92,13 +92,14 @@ def self.decrypt_file(encrypt_file, clear_file, key_path)
def self.sign_apk(apk_path, keystore_path, key_password, alias_name, alias_password, zip_align)

build_tools_path = self.get_build_tools()
UI.message("BUild tools path: #{build_tools_path}")

# https://developer.android.com/studio/command-line/zipalign
if zip_align == true
apk_path_aligned = apk_path.gsub(".apk", "-aligned.apk")
`rm -f '#{apk_path_aligned}'`
UI.message("Aligning APK (zipalign): #{apk_path_aligned}")
`#{build_tools_path}zipalign 4 '#{apk_path}' '#{apk_path_aligned}'`
`#{build_tools_path}zipalign -f -c -v 4 '#{apk_path}' '#{apk_path_aligned}'`
else
UI.message("No zip align!")
apk_path_aligned = apk_path
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/match_keystore/version.rb
@@ -1,5 +1,5 @@
module Fastlane
module MatchKeystore
VERSION = "0.1.12"
VERSION = "0.1.13"
end
end

0 comments on commit 11c74b1

Please sign in to comment.