/// Updates a dependency if it exists, otherwise adds a new dependency.
/// </summary>
/// <param name="dependenciesDocument">The dependencies document we are writing to</param>
/// <param name="parentTag">The parent tag that we want to search for the dependency. For example, to add a new dependency to Android, pass in "androidPackages"</param>
/// <param name="elementTag">The element we are looking to update/add. For example, to add a new dependency to Android, pass in "androidPackage"</param>
/// <param name="matchAttribute">The attribute name we want in the dependency. For example, to add something to the spec attribute, pass in "spec" </param>
/// <param name="matchValuePrefix">The attribute value prefix we are looking to replace. For example, "com.google.android.ump:user-messaging-platform"</param>
/// <param name="newDependency">The new dependency we want to add.</param>
/// <param name="doc">The xml file to remove a dependency from</param>
/// <param name="parentTag">The parent tag that we want to search for the dependency to remove. For example: "androidPackages"</param>
/// <param name="elementTag">The element we are looking to remove. For example: "androidPackage"</param>
/// <param name="matchAttribute">The attribute name we want to remove. For example: "spec" </param>
/// <param name="matchValuePrefix">The attribute value prefix we are looking to replace. For example: "com.google.android.ump:user-messaging-platform"</param>
/// <returns>True if the dependency was removed successfully, otherwise return false.</returns>