Class: Pod::SPM::Resolver

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-spm/resolver.rb,
lib/cocoapods-spm/resolver/result.rb,
lib/cocoapods-spm/resolver/product.rb,
lib/cocoapods-spm/resolver/target_dep_resolver.rb,
lib/cocoapods-spm/resolver/product_dep_resolver.rb

Defined Under Namespace

Classes: Product, ProductDependencyResolver, Result, TargetDependencyResolver

Instance Method Summary collapse

Constructor Details

#initialize(podfile, aggregate_targets) ⇒ Resolver

Returns a new instance of Resolver.



11
12
13
14
15
16
17
18
# File 'lib/cocoapods-spm/resolver.rb', line 11

def initialize(podfile, aggregate_targets)
  @_result = Result::WritableResult.new
  @podfile = podfile
  @aggregate_targets = aggregate_targets
  @umbrella_pkg = nil
  @target_dep_resolver = TargetDependencyResolver.new(podfile, aggregate_targets, @_result)
  @product_dep_resolver = ProductDependencyResolver.new(podfile, @_result)
end

Instance Method Details

#resolveObject



20
21
22
23
24
# File 'lib/cocoapods-spm/resolver.rb', line 20

def resolve
  generate_umbrella_pkg
  resolvers.each(&:resolve)
  validate!
end

#resultObject



26
27
28
# File 'lib/cocoapods-spm/resolver.rb', line 26

def result
  @result ||= @_result.to_read_only
end