Commit e67c29dd authored by Robin Fischer's avatar Robin Fischer

Add modification of string resources for Crashlytics

parent 9c051b47
......@@ -41,6 +41,11 @@ module Fastlane
unless params[:version_code].nil?
command << " /p:AndroidVersionCodePattern={civersioncode}"
command << " /p:AndroidVersionCodeProperties=civersioncode=#{params[:version_code]}"
unless params[:android_string_resources_path].nil?
crashlytics_replace_command = "if [[ -f \"#{params[:android_string_resources_path]}\" ]]; then sed -i '' 's/\<string name=\"com.crashlytics.android.build_id\"\>1\<\/string\>/\<string name=\"com.crashlytics.android.build_id\"\>#{params[:version_code]}\<\/string\>/' #{params[:android_string_resources_path]}; fi"
FastlaneCore::CommandExecutor.execute(command: crashlytics_replace_command, print_all: true, print_command: true)
end
end
unless params[:version_name].nil? || params[:android_manifest_path].nil?
replace_command = "sed -i '' 's/android:versionName=\"1.0\"/android:versionName=\"#{params[:version_name]}\"/' #{params[:android_manifest_path]}"
......@@ -151,6 +156,14 @@ module Fastlane
type: String,
),
FastlaneCore::ConfigItem.new(
key: :android_string_resources_path,
optional: true,
env_name: 'FL_MSBUILD_ANDROID_STRING_RESOURCES_PATH',
description: "Path to the Strings.xml file which contains the main string resources. Used to set com.crashlytics.android.build_id",
type: String,
),
FastlaneCore::ConfigItem.new(
key: :android_sign_with_key_store,
env_name: 'FL_MSBUILD_ANDROID_SIGN_WITH_KEY_STORE',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment