From e296cfa1f27a4b7ebdcec0679d2eba7481812e86 Mon Sep 17 00:00:00 2001 From: AliRezaBeigy Date: Sun, 19 Oct 2025 10:53:55 +0330 Subject: [PATCH] refactor: removing the deprecated jcenter Updated build.gradle to use Google repositories for the Android Gradle plugin. --- android/build.gradle | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index dbbe046..ab08997 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -3,12 +3,18 @@ def safeExtGet(prop, fallback) { } buildscript { - repositories { - jcenter() - } + // The Android Gradle plugin is only required when opening the android folder stand-alone. + // This avoids unnecessary downloads and potential conflicts when the library is included as a + // module dependency in an application project. + // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies + if (project == rootProject) { + repositories { + google() + } - dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + dependencies { + classpath 'com.android.tools.build:gradle:1.3.1' + } } }