Skip to content

Commit

Permalink
Fix path to react-native when developing outside of the example app
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Spike Brehm authored and alvinthen committed Sep 2, 2016
1 parent 31cfa0e commit 9c995bf
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ buildscript {
mavenLocal()
jcenter()
maven {
// For developing the library outside the context of the example app, expect `react-native`
// to be installed at `./android/node_modules`.
url "$projectDir/../node_modules/react-native/android"
}
maven {
// For developing the example app, expect this library to be installed as a node module
// inside of the example app. So traverse from `./android/example/node_modules/react-native-maps/android`
// to `./android/example/node_modules/react-native/android`.
// react-native should be installed since it's a peer dependency
url "$projectDir/../../react-native/android"
}
}
Expand All @@ -20,8 +29,15 @@ allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// For developing the library outside the context of the example app, expect `react-native`
// to be installed at `./android/node_modules`.
url "$projectDir/../node_modules/react-native/android"
}
maven {
// Refer to the local install of react-native in the node_modules folder
// For developing the example app, expect this library to be installed as a node module
// inside of the example app. So traverse from `./android/example/node_modules/react-native-maps/android`
// to `./android/example/node_modules/react-native/android`.
// react-native should be installed since it's a peer dependency
url "$projectDir/../../react-native/android"
}
Expand Down

0 comments on commit 9c995bf

Please sign in to comment.