Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
fix(android,build): load Android Gradle Plugin conditionally
Browse files Browse the repository at this point in the history
- Load Android Gradle Plugin conditionally
- get project default ext configs from the root project
  • Loading branch information
SaeedZhiany authored and Salakar committed Jan 27, 2020
1 parent 978c9ea commit 30d56fc
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
// 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.
if (project == rootProject) {
repositories {
google()
jcenter()
}

dependencies {
classpath("com.android.tools.build:gradle:3.5.3")
}
}
}

Expand All @@ -21,7 +27,7 @@ project.ext {
compileSdk: 29,
// optional as gradle.buildTools comes with one by default
// overriding here though to match the version RN uses
// buildTools: "28.0.3"
// buildTools: "29.0.2"
],
],
])
Expand Down

0 comments on commit 30d56fc

Please sign in to comment.