Sha256: cdbe547e49175d80af0c443d6f8e0a0279433fe1b11c1b041414ea7b04ef8164

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

require 'fastlane_core/helper'
require 'fastlane/boolean'
require_relative 'detect_values'

module Gym
  class << self
    attr_accessor :config

    attr_accessor :project

    attr_accessor :cache

    def config=(value)
      @config = value
      DetectValues.set_additional_default_values
      @cache = {}
    end

    def gymfile_name
      "Gymfile"
    end

    def init_libs
      # Import all the fixes
      require 'gym/xcodebuild_fixes/generic_archive_fix'
    end

    def building_mac_catalyst_for_ios?
      Gym.project.supports_mac_catalyst? && Gym.config[:catalyst_platform] == "ios"
    end

    def building_mac_catalyst_for_mac?
      Gym.project.supports_mac_catalyst? && Gym.config[:catalyst_platform] == "macos"
    end

    def export_destination_upload?
      config_path = Gym.cache[:config_path]
      return false if config_path.nil?

      result = CFPropertyList.native_types(CFPropertyList::List.new(file: config_path).value)
      return result["destination"] == "upload"
    end
  end

  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
  UI = FastlaneCore::UI
  Boolean = Fastlane::Boolean
  ROOT = Pathname.new(File.expand_path('../../..', __FILE__))
  DESCRIPTION = "Building your iOS apps has never been easier"

  Gym.init_libs
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fastlane-2.154.0 gym/lib/gym/module.rb