class AppInfo::Proguard
Proguard
parser
Constants
- NAMESPACE
Attributes
file[R]
Public Class Methods
new(file)
click to toggle source
# File lib/app_info/proguard.rb, line 13 def initialize(file) @file = file end
Public Instance Methods
clear!()
click to toggle source
# File lib/app_info/proguard.rb, line 89 def clear! return unless @contents FileUtils.rm_rf(@contents) @contents = nil @manifest = nil @mapping_path = nil @metadata_path = nil @manifest_path = nil @symbol_path = nil end
contents()
click to toggle source
# File lib/app_info/proguard.rb, line 85 def contents @contents ||= Util.unarchive(@file, path: 'proguard') end
file_type()
click to toggle source
# File lib/app_info/proguard.rb, line 17 def file_type AppInfo::Platform::PROGUARD end
manifest()
click to toggle source
# File lib/app_info/proguard.rb, line 66 def manifest return unless manifest? @manifest ||= REXML::Document.new(File.new(manifest_path)) end
manifest?()
click to toggle source
# File lib/app_info/proguard.rb, line 31 def manifest? File.exist?(manifest_path) end
manifest_path()
click to toggle source
# File lib/app_info/proguard.rb, line 76 def manifest_path @manifest_path ||= File.join(contents, 'AndroidManifest.xml') end
mapping?()
click to toggle source
# File lib/app_info/proguard.rb, line 27 def mapping? File.exist?(mapping_path) end
mapping_path()
click to toggle source
# File lib/app_info/proguard.rb, line 72 def mapping_path @mapping_path ||= Dir.glob(File.join(contents, '*mapping*.txt')).first end
package_name()
click to toggle source
# File lib/app_info/proguard.rb, line 40 def package_name return unless manifest? manifest.root.attributes['package'] end
releasd_version()
click to toggle source
# File lib/app_info/proguard.rb, line 46 def releasd_version return unless manifest? manifest.root.attributes['package'] end
symbol?()
click to toggle source
# File lib/app_info/proguard.rb, line 35 def symbol? File.exist?(symbol_path) end
Also aliased as: resource?
symbol_path()
click to toggle source
# File lib/app_info/proguard.rb, line 80 def symbol_path @symbol_path ||= File.join(contents, 'R.txt') end
Also aliased as: resource_path
uuid()
click to toggle source
# File lib/app_info/proguard.rb, line 21 def uuid # Similar to https://docs.sentry.io/workflow/debug-files/#proguard-uuids UUIDTools::UUID.sha1_create(NAMESPACE, File.read(mapping_path)).to_s end
Also aliased as: debug_id
version_code()
click to toggle source
# File lib/app_info/proguard.rb, line 59 def version_code return unless manifest? manifest.root.attributes['versionCode'] end
Also aliased as: build_version
version_name()
click to toggle source
# File lib/app_info/proguard.rb, line 52 def version_name return unless manifest? manifest.root.attributes['versionName'] end
Also aliased as: release_version