Class: Dependabot::Gradle::FileFetcher

Inherits:
FileFetchers::Base
  • Object
show all
Defined in:
lib/dependabot/gradle/file_fetcher.rb,
lib/dependabot/gradle/file_fetcher/settings_file_parser.rb

Defined Under Namespace

Classes: SettingsFileParser

Constant Summary collapse

SUPPORTED_BUILD_FILE_NAMES =
%w(build.gradle build.gradle.kts).freeze
SUPPORTED_SETTINGS_FILE_NAMES =
%w(settings.gradle settings.gradle.kts).freeze

Class Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
21
# File 'lib/dependabot/gradle/file_fetcher.rb', line 17

def self.required_files_in?(filenames)
  filenames.any? do |filename|
    SUPPORTED_BUILD_FILE_NAMES.include?(filename)
  end
end

.required_files_messageObject



23
24
25
# File 'lib/dependabot/gradle/file_fetcher.rb', line 23

def self.required_files_message
  "Repo must contain a build.gradle / build.gradle.kts file."
end