Class: BuildrDependencyExtensions::HighestVersionConflictResolver
- Inherits:
-
ResolverBase
- Object
- ResolverBase
- BuildrDependencyExtensions::HighestVersionConflictResolver
- Defined in:
- lib/buildr-dependency-extensions/resolver.rb
Instance Method Summary collapse
Methods inherited from ResolverBase
#initialize, #resolve_from_hash, #resolved
Constructor Details
This class inherits a constructor from BuildrDependencyExtensions::ResolverBase
Instance Method Details
#resolve(artifact, all_artifacts) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/buildr-dependency-extensions/resolver.rb', line 17 def resolve artifact, all_artifacts version = resolve_from_hash artifact if version version else all_versions = HelperFunctions.get_all_versions(artifact, all_artifacts).uniq if all_versions.size > 1 puts $terminal.color("Warning: found versions #{all_versions.join(', ')} for artifact #{artifact}. Choosing #{all_versions[0]}", :yellow) end resolved artifact, all_versions[0] all_versions[0] end end |