From 53d3456fa778f82c07d7feeab4b294b83f9c4dbc Mon Sep 17 00:00:00 2001 From: Dmitry Boltachev Date: Wed, 22 Apr 2020 21:01:14 +0300 Subject: [PATCH] fix(Android): Make content of buildscript optional (#245) Fix gradle build error where it can't find specified version of gradle. --- android/build.gradle | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8024a496..3b724e17 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -38,14 +38,16 @@ android { } buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.5.0' + if (project == rootProject) { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.0' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } } }