Skip to content

Commit 91a97e6

Browse files
author
Spike Brehm
committed
Fix path to react-native when developing outside of the example app
In react-native-maps#502, the local maven url pointing to the `react-native` node module changed to work better for the example app. However, that broke the path to `react-native` when developing in the context of the library, not the example app. In this PR, specify both paths.
1 parent b101ff6 commit 91a97e6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

android/build.gradle

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ buildscript {
88
mavenLocal()
99
jcenter()
1010
maven {
11+
// For developing the library outside the context of the example app, expect `react-native`
12+
// to be installed at `./android/node_modules`.
13+
url "$projectDir/../node_modules/react-native/android"
14+
}
15+
maven {
16+
// For developing the example app, expect this library to be installed as a node module
17+
// inside of the example app. So traverse from `./android/example/node_modules/react-native-maps/android`
18+
// to `./android/example/node_modules/react-native/android`.
19+
// react-native should be installed since it's a peer dependency
1120
url "$projectDir/../../react-native/android"
1221
}
1322
}
@@ -20,8 +29,15 @@ allprojects {
2029
repositories {
2130
mavenLocal()
2231
jcenter()
32+
maven {
33+
// For developing the library outside the context of the example app, expect `react-native`
34+
// to be installed at `./android/node_modules`.
35+
url "$projectDir/../node_modules/react-native/android"
36+
}
2337
maven {
24-
// Refer to the local install of react-native in the node_modules folder
38+
// For developing the example app, expect this library to be installed as a node module
39+
// inside of the example app. So traverse from `./android/example/node_modules/react-native-maps/android`
40+
// to `./android/example/node_modules/react-native/android`.
2541
// react-native should be installed since it's a peer dependency
2642
url "$projectDir/../../react-native/android"
2743
}

0 commit comments

Comments
 (0)