Skip to content

Commit

Permalink
Merge pull request #2 from wordpress-mobile/fix/local-maven-repo-when…
Browse files Browse the repository at this point in the history
…-building-from-source

Maven repo is in node_modules when building as an npm dep
  • Loading branch information
hypest authored Dec 20, 2019
2 parents 99b012b + a0bb36a commit 6c75579
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions android-exoplayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ repositories {
mavenLocal()
google()
jcenter()
maven {
url "https://dl.bintray.com/wordpress-mobile/react-native-mirror/"
if (project == rootProject) {
maven {
url "https://dl.bintray.com/wordpress-mobile/react-native-mirror/"
}
} else {
// When building as a dep, the RN's maven repo is locally in the node_modules folder
def nodeModulesPath = "${project.buildDir}/../../node_modules/"
maven { url "${nodeModulesPath}/react-native/android" }
}
}

Expand Down
10 changes: 8 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ repositories {
mavenLocal()
google()
jcenter()
maven {
url "https://dl.bintray.com/wordpress-mobile/react-native-mirror/"
if (project == rootProject) {
maven {
url "https://dl.bintray.com/wordpress-mobile/react-native-mirror/"
}
} else {
// When building as a dep, the RN's maven repo is locally in the node_modules folder
def nodeModulesPath = "${project.buildDir}/../../node_modules/"
maven { url "${nodeModulesPath}/react-native/android" }
}
}

Expand Down

0 comments on commit 6c75579

Please sign in to comment.