function updateGradleWrapperSync() {
  const newVersion = getGradleVersionByRNVersion();

  const gradleWrapperPath = path.join(process.cwd(), 'android', 'gradle', 'wrapper', 'gradle-wrapper.properties');
  console.log(`Updating Gradle wrapper to version$ {newVersion}. File: ${gradleWrapperPath}`);

  try {
    let data = fs.readFileSync(gradleWrapperPath, 'utf8');
    let updatedData = data.replace(/distributionUrl=.+\n/, `distributionUrl=https\\://services.gradle.org/distributions/gradle-${newVersion}-bin.zip\n`);

    fs.writeFileSync(gradleWrapperPath, updatedData, 'utf8');
    console.log(`Gradle wrapper updated successfully to version ${newVersion}.`);
  } catch (err) {
    console.error('Error:', err);
  }
}
Update the Gradle wrapper to the specified version.