Class: Fastlane::SwiftPluginsAPIGenerator

Inherits:
SwiftAPIGenerator show all
Defined in:
fastlane/lib/fastlane/swift_fastlane_api_generator.rb

Constant Summary

Constants inherited from SwiftAPIGenerator

Fastlane::SwiftAPIGenerator::DEFAULT_API_VERSION_STRING

Instance Attribute Summary

Attributes inherited from SwiftAPIGenerator

#action_options_to_ignore, #actions_not_supported, #fastlane_swift_api_path, #generated_paths, #target_filename, #target_output_path, #tools_option_files

Instance Method Summary collapse

Methods inherited from SwiftAPIGenerator

#autogen_version_warning_text, #determine_api_version, #extend_content, #find_api_version_string, #generate_default_implementations, #generate_lanefile_parsing_functions, #generate_lanefile_tool_objects, #generate_swift, #generate_tool_protocol, #ignore_param?, #increment_api_version_string, #process_action, #write_lanefile

Constructor Details

#initialize(target_output_path: "swift") ⇒ SwiftPluginsAPIGenerator

Returns a new instance of SwiftPluginsAPIGenerator.



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'fastlane/lib/fastlane/swift_fastlane_api_generator.rb', line 92

def initialize(target_output_path: "swift")
  @target_filename = "Plugins.swift"
  @target_output_path = File.expand_path(target_output_path)
  @generated_paths = []

  super()

  # Gets list of plugin actions
  plugin_actions = Fastlane.plugin_manager.plugin_references.values.flat_map do |info|
    info[:actions]
  end

  # Action references from plugins
  available_plugins = plugin_actions.map do |plugin_action|
    Fastlane::Runner.new.class_reference_from_action_name(plugin_action)
  end

  # Excludes all actions that aren't pluign actions (including external actions)
  available_actions = []
  ActionsList.all_actions do |action|
    next unless action.respond_to?(:action_name)
    available_actions << action.action_name unless available_plugins.include?(action)
  end

  self.actions_not_supported = (["import", "import_from_git"] + available_actions).to_set
  self.action_options_to_ignore = {}
end