I know a thing or two about JS and react-native. I was trying to comprehend the JAVA config of RN (by going through the Android docs in google developer training)
In this Section, The author have written following line
If a dependency is something other than a local library or file tree, Gradle looks for the files in whichever online repositories are specified in the repositories block of this file
I am Unable to comprhend the above line.
Also, In my current react-native project, it looks something like this (build.gradle)
allprojects { repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } google() jcenter() maven { url 'https://maven.google.com' } maven { url 'https://jitpack.io' } }}
Where as in project created by android it looks like this
allprojects { repositories { google() jcenter() }}
Can someone explain the difference? what is
maven { url 'https://maven.google.com' } maven { url 'https://jitpack.io' }
And
mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") }
Why does RN people have them like this when compared to Android project created by android studio