Skip to content

Commit 6049d07

Browse files
committed
fixed build.gradle to allow working on project in Android Studio
1 parent 88a8a7c commit 6049d07

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

Diff for: android/build.gradle

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
// START - required to allow working on this project inside Android Studio
2+
// YES, jcenter is required twice - it somehow tricks studio into compiling deps below
3+
// doesn't break anything anywhere else and projects using this lib work as normal
4+
buildscript {
5+
repositories {
6+
jcenter()
7+
}
8+
dependencies {
9+
classpath 'com.android.tools.build:gradle:2.1.3'
10+
}
11+
}
12+
// END
13+
114
apply plugin: 'com.android.library'
215

316
android {
@@ -18,10 +31,20 @@ android {
1831
}
1932
}
2033

34+
// START - required to allow working on this project inside Android Studio
35+
// YES, jcenter is required twice - it somehow tricks studio into compiling deps below
36+
// doesn't break anything anywhere else and projects using this lib work as normal
37+
// you'll now have code completion/validation and all the other AS goodies.
38+
allprojects {
39+
repositories {
40+
jcenter()
41+
}
42+
}
43+
// END
44+
2145
dependencies {
2246
compile 'com.facebook.react:react-native:0.20.+'
23-
compile 'com.google.android.gms:play-services-base:9.8.1'
24-
47+
compile 'com.google.android.gms:play-services-base:9.8.0'
2548
compile 'com.google.firebase:firebase-core:9.8.0'
2649
compile 'com.google.firebase:firebase-auth:9.8.0'
2750
compile 'com.google.firebase:firebase-analytics:9.8.0'

0 commit comments

Comments
 (0)