From 28ce9e621627e81445ae9752924f78047707d9a0 Mon Sep 17 00:00:00 2001 From: Marcelo Oliveira Date: Thu, 8 Apr 2021 21:12:29 -0300 Subject: [PATCH 1/3] Auto select either native_code or proguard --- supply/lib/supply/client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/supply/lib/supply/client.rb b/supply/lib/supply/client.rb index a0a45d03917..a4aa6ad266f 100644 --- a/supply/lib/supply/client.rb +++ b/supply/lib/supply/client.rb @@ -327,12 +327,14 @@ def upload_apk_to_internal_app_sharing(package_name, path_to_apk) def upload_mapping(path_to_mapping, apk_version_code) ensure_active_edit! + extension = File.extname(path_to_mapping).downcase + call_google_api do client.upload_edit_deobfuscationfile( current_package_name, current_edit.id, apk_version_code, - "proguard", + extension == ".zip" ? "nativeCode" : "proguard", upload_source: path_to_mapping, content_type: "application/octet-stream" ) From 0ee71e433c75c31aa5ce2ca8b4dbf54a449c5f53 Mon Sep 17 00:00:00 2001 From: Marcelo Oliveira Date: Thu, 8 Apr 2021 23:23:42 -0300 Subject: [PATCH 2/3] Add some UI message --- supply/lib/supply/uploader.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/lib/supply/uploader.rb b/supply/lib/supply/uploader.rb index e6f4d201b1d..91deff85638 100644 --- a/supply/lib/supply/uploader.rb +++ b/supply/lib/supply/uploader.rb @@ -304,6 +304,7 @@ def upload_mapping(apk_version_codes) mapping_paths = [Supply.config[:mapping]] unless (mapping_paths = Supply.config[:mapping_paths]) mapping_paths.zip(apk_version_codes).each do |mapping_path, version_code| if mapping_path + UI.message("Preparing mapping at path '#{mapping_path}', version code #{version_code} for upload...") client.upload_mapping(mapping_path, version_code) end end From f607792b85dc7d29eca07100c5c46ca1acfd61dc Mon Sep 17 00:00:00 2001 From: Marcelo Oliveira Date: Fri, 9 Apr 2021 01:52:36 -0300 Subject: [PATCH 3/3] Document parameter change --- supply/lib/supply/options.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supply/lib/supply/options.rb b/supply/lib/supply/options.rb index 9bad5867ab7..e4b4b02e8d0 100755 --- a/supply/lib/supply/options.rb +++ b/supply/lib/supply/options.rb @@ -223,7 +223,7 @@ def self.available_options default_value: false), FastlaneCore::ConfigItem.new(key: :mapping, env_name: "SUPPLY_MAPPING", - description: "Path to the mapping file to upload", + description: "Path to the mapping file to upload (mapping.txt or native-debug-symbols.zip alike)", short_option: "-d", conflicting_options: [:mapping_paths], optional: true, @@ -235,7 +235,7 @@ def self.available_options conflicting_options: [:mapping], optional: true, type: Array, - description: "An array of paths to mapping files to upload", + description: "An array of paths to mapping files to upload (mapping.txt or native-debug-symbols.zip alike)", short_option: "-s", verify_block: proc do |value| UI.user_error!("Could not evaluate array from '#{value}'") unless value.kind_of?(Array)