b0VIM 9.0b&+joshholtzJoshs-MacBook-Air.local~joshholtz/Developer/fastlane/fastlane/fastlane_core/lib/fastlane_core/project.rb 3210#"! Utpe]f|P?W=adexwcC m s R + P O ^ :  ~ ] M o [ ,  s!ts7nmDqaD0   def project_name end self.is_workspace def workspace? end @options = new_value UI.deprecated('Update `options` is not worth doing since it can change behavior of this object entirely. Consider re-creating FastlaneCore::Project.') def options=(new_value) end @options.kind_of?(FastlaneCore::Configuration) ? @options.values : @options # due to `FastlaneCore::Configuration` to validate valid keys defined. # converts `options` to a plain Hash. Otherwise, it might crash when a new option's key is added # To keep compatibility with actions using this class from outside of `fastlane` gem; i.e. `xcov`, def options # @return [Hash] a hash object containing project, workspace, scheme, any configuration related to xcodebuild, or etc... end end UI.user_error!("Could not find project at path '#{path}'") if !path || !File.directory?(path) @is_workspace = (self.options[:workspace].to_s.length > 0) @path = File.expand_path(self.options[:workspace] || self.options[:project]) @options = options def initialize(options) # @param xcodebuild_suppress_stderr [Boolean] a flag to supress output to stderr from xcodebuild # @param xcodebuild_list_silent [Boolean] a flag to silent xcodebuild command's output # @param options [FastlaneCore::Configuration|Hash] a set of configuration to run xcodebuild to work out build settings attr_accessor :is_workspace # Is this project a workspace? attr_accessor :path # Path to the project/workspace end end end end UI.error("Couldn't find project at path '#{File.expand_path(path)}'") else end UI.error("Path must end with either .xcworkspace or .xcodeproj") else break config[:project] = path elsif path.end_with?(".xcodeproj") break config[:workspace] = path if path.end_with?(".xcworkspace") if File.directory?(path) path = UI.input("Couldn't automatically detect the project file, please provide a path: ") loop do def select_project(config) end end select_project(config) if config[:workspace].nil? && config[:project].nil? end end config[:project] = project.first elsif !project.first.nil? config[:project] = choose(*project) puts("Select Project: ") if project.count > 1 project = Dir["./*.xcodeproj"] if config[:workspace].to_s.length == 0 && config[:project].to_s.length == 0 return if config[:workspace].to_s.length > 0 end end config[:workspace] = workspace.first elsif !workspace.first.nil? config[:workspace] = choose(*workspace) puts("Select Workspace: ") if workspace.count > 1 workspace = Dir["./*.xcworkspace"] if config[:workspace].to_s.length == 0 return if config[:project].to_s.length > 0 end UI.user_error!("You can only pass either a workspace or a project path, not both") if config[:workspace].to_s.length > 0 && config[:project].to_s.length > 0 def detect_projects(config) # Project discovery class << self class Project # rubocop:disable Metrics/ClassLength # Represents an Xcode projectmodule FastlaneCorerequire 'fastlane_core/command_executor'require_relative './configuration/configuration'require 'xcodeproj'require_relative 'helper'ad+;=\54kjLK(' b L   Z 6   V } W zoI!ME?;:end end end FastlaneCore::Env.truthy?("AUTOMATED_SCHEME_SELECTION") def automated_scheme_selection? # matching project name? # If scheme not specified, do we want the scheme private end end return @_project_paths = [path] # Return the path as an array else return @_project_paths end current_match.end_with?("Pods/Pods.xcodeproj") # We're not interested in a `Pods` project, as it doesn't contain any relevant information about code signing end.reject do |current_match| current_match.end_with?(".xcodeproj") # Xcode workspaces can contain loose files now, so let's filter non-xcodeproj files. @_project_paths = file_references_paths.select do |current_match| file_references_paths = workspace.file_references.map { |fr| fr.absolute_path(workspace_dir_path) } workspace_dir_path = File.expand_path("..", self.path) # for details see https://github.com/CocoaPods/Xcodeproj/blob/e0287156d426ba588c9234bb2a4c824149889860/lib/xcodeproj/workspace/file_reference.rb``` # * handle different types (group:, container: etc.) of file references and their paths # * parse the contents.xcworkspacedata XML file # Use Xcodeproj gem here to # We have a reference to the workspace, let's find the xcodeproj file # Find the xcodeproj file, as the information isn't included in the workspace file if self.workspace? return @_project_paths if @_project_paths def project_paths # (might be multiple, because of workspaces) # Array of paths to all project files end return result end retry try_timeout = next_timeout try += 1 raise if try_limit_reached UI.important(message) message += ", trying again with a #{next_timeout} second timeout..." unless try_limit_reached message = "Command timed out after #{try_timeout} seconds on try #{try} of #{total_tries}" next_timeout = try_timeout * 2 # Try harder on each iteration try_limit_reached = try >= total_tries rescue Timeout::Error end result = `#{command}`.to_s