mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 22:42:55 +08:00
fix zipalign path
This commit is contained in:
@@ -341,7 +341,7 @@ EOS
|
||||
end
|
||||
|
||||
App.info 'Align', archive
|
||||
sh "\"#{App.config.sdk_path}/build-tools/20.0.0/zipalign\" -f 4 \"#{archive}\" \"#{archive}-aligned\""
|
||||
sh "\"#{App.config.zipalign_path}\" -f 4 \"#{archive}\" \"#{archive}-aligned\""
|
||||
sh "/bin/mv \"#{archive}-aligned\" \"#{archive}\""
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ module Motion; module Project;
|
||||
class AndroidConfig < Config
|
||||
register :android
|
||||
|
||||
variable :sdk_path, :ndk_path, :avd_config, :package, :main_activity,
|
||||
variable :sdk_path, :ndk_path, :zipalign_path, :avd_config, :package, :main_activity,
|
||||
:sub_activities, :api_version, :arch, :assets_dirs, :icon,
|
||||
:logs_components, :version_code, :version_name
|
||||
|
||||
@@ -65,6 +65,10 @@ module Motion; module Project;
|
||||
super
|
||||
end
|
||||
|
||||
def zipalign_path
|
||||
@zipalign ||= Dir.glob(File.join(sdk_path, 'build-tools/*/zipalign')).last
|
||||
end
|
||||
|
||||
def package
|
||||
@package ||= 'com.yourcompany' + '.' + name.downcase.gsub(/\s/, '')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user