class Fastlane::Actions::XambuildAction

Public Class Methods

author() click to toggle source
# File lib/fastlane/plugin/xambuild/actions/xambuild_action.rb, line 55
def self.author
  "Jake Barnby"
end
available_options() click to toggle source
# File lib/fastlane/plugin/xambuild/actions/xambuild_action.rb, line 59
def self.available_options
  ::Xambuild::Options.available_options
end
description() click to toggle source
# File lib/fastlane/plugin/xambuild/actions/xambuild_action.rb, line 47
def self.description
  "Easily build and sign your Xamarin iOS or Android app using `xambuild`"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/xambuild/actions/xambuild_action.rb, line 63
def self.is_supported?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/xambuild/actions/xambuild_action.rb, line 51
def self.return_value
  "The absolute path to the generated app file"
end
run(values) click to toggle source
# File lib/fastlane/plugin/xambuild/actions/xambuild_action.rb, line 14
def self.run(values)
  values[:platform] = ::CsProj::Platform.from_lane_context(Actions.lane_context)
  ::CsProj.config = values

  if ::CsProj.project.ios? || ::CsProj.project.osx?
    absolute_ipa_path = File.expand_path(::Xambuild::Manager.new.work(values))
    absolute_app_path = File.join(values[:output_path], "#{values[:assembly_name]}.app")
    absolute_dsym_path = absolute_ipa_path.gsub(".ipa", ".app.dSYM.zip")

    Actions.lane_context[SharedValues::APP_OUTPUT_PATH] = absolute_app_path
    Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = absolute_ipa_path
    Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = absolute_dsym_path if File.exist?(absolute_dsym_path)
    ENV[SharedValues::APP_OUTPUT_PATH.to_s] = absolute_app_path
    ENV[SharedValues::APP_BUNDLE_PATH.to_s] = absolute_app_path # for calabash
    ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_ipa_path # for deliver
    ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path if File.exist?(absolute_dsym_path)

    absolute_ipa_path
  elsif ::CsProj.project.android?
    if values[:keystore_path] && values[:keystore_alias]
      unless values[:keystore_password]
        ::CsProj.config[:keystore_password] = ask("Password (for #{values[:keystore_alias]}): ") { |q| q.echo = "*" }
      end
    end
    absolute_apk_path = File.expand_path(::Xambuild::Manager.new.work(values))

    Actions.lane_context[SharedValues::GRADLE_BUILD_TYPE] = values[:build_configuration]
    Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] = absolute_apk_path

    absolute_apk_path
  end
end