You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: file_updater.rb
    path of file: ./repos/dependabot-core/gradle/lib/dependabot/gradle
    
    the code of the file until where you have to start completion: # typed: false
# frozen_string_literal: true

require "dependabot/file_updaters"
require "dependabot/file_updaters/base"
require "dependabot/gradle/file_parser"

module Dependabot
  module Gradle
    class FileUpdater < Dependabot::FileUpdaters::Base
      require_relative "file_updater/dependency_set_updater"
      require_relative "file_updater/property_value_updater"

      SUPPORTED_BUILD_FILE_NAMES = %w(build.g
    
      def update_version_in_buildfile(dependency, buildfile, previous_req,
                                      requirement)
        original_content = buildfile.content.dup

        updated_content =
          original_buildfile_declarations(dependency, previous_req).reduce(original_content) do |content, declaration|
            content.gsub(
              declaration,
              updated_buildfile_declaration(
                declaration,
                previous_req,
                requirement
              )
            )
          end

        raise "Expected content to change!" if updated_content == buildfile.content

        updated_file(file: buildfile, content: updated_content)
      end