Skip to content

Commit 1c94420

Browse files
committed
build: prevent loading repos if not needed
1 parent 611e130 commit 1c94420

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

android/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ def safeExtGet(prop, fallback) {
33
}
44

55
buildscript {
6+
// Only need dependencies when building in isolation. As a library we can assume repos from parent.
7+
if (project == rootProject) {
68
repositories {
7-
mavenCentral()
9+
google()
10+
mavenCentral()
811
}
9-
1012
dependencies {
11-
classpath 'com.android.tools.build:gradle:1.5.0'
13+
classpath("com.android.tools.build:gradle:7.2.1")
1214
}
15+
}
1316
}
1417

1518
apply plugin: 'com.android.library'

0 commit comments

Comments
 (0)