Class: Dependabot::Gradle::UpdateChecker
- Inherits:
-
UpdateCheckers::Base
- Object
- UpdateCheckers::Base
- Dependabot::Gradle::UpdateChecker
show all
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/gradle/update_checker.rb,
lib/dependabot/gradle/update_checker/version_finder.rb,
lib/dependabot/gradle/update_checker/requirements_updater.rb,
lib/dependabot/gradle/update_checker/multi_dependency_updater.rb
Defined Under Namespace
Classes: MultiDependencyUpdater, RequirementsUpdater, VersionFinder
Instance Method Summary
collapse
Instance Method Details
#latest_resolvable_version ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/dependabot/gradle/update_checker.rb', line 26
def latest_resolvable_version
return if git_dependency?
return nil if version_comes_from_multi_dependency_property?
return nil if version_comes_from_dependency_set?
latest_version
end
|
#latest_resolvable_version_with_no_unlock ⇒ Object
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/dependabot/gradle/update_checker.rb', line 54
def latest_resolvable_version_with_no_unlock
nil
end
|
#latest_version ⇒ Object
19
20
21
22
23
|
# File 'lib/dependabot/gradle/update_checker.rb', line 19
def latest_version
return if git_dependency?
latest_version_details&.fetch(:version)
end
|
#lowest_resolvable_security_fix_version ⇒ Object
45
46
47
48
49
50
51
|
# File 'lib/dependabot/gradle/update_checker.rb', line 45
def lowest_resolvable_security_fix_version
return if git_dependency?
return nil if version_comes_from_multi_dependency_property?
return nil if version_comes_from_dependency_set?
lowest_security_fix_version
end
|
#lowest_security_fix_version ⇒ Object
40
41
42
|
# File 'lib/dependabot/gradle/update_checker.rb', line 40
def lowest_security_fix_version
lowest_security_fix_version_details&.fetch(:version)
end
|
#requirements_unlocked_or_can_be? ⇒ Boolean
80
81
82
83
84
|
# File 'lib/dependabot/gradle/update_checker.rb', line 80
def requirements_unlocked_or_can_be?
!dependency.version&.include?("$")
end
|
#updated_requirements ⇒ Object
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/dependabot/gradle/update_checker.rb', line 66
def updated_requirements
property_names =
declarations_using_a_property
.map { |req| req.dig(:metadata, :property_name) }
RequirementsUpdater.new(
requirements: dependency.requirements,
latest_version: preferred_resolvable_version&.to_s,
source_url: preferred_version_details&.fetch(:source_url),
properties_to_update: property_names
).updated_requirements
end
|