how to make a git repo package as a npm code example

Example 1: how to run a cloned react native project

npm install --save github:facebook/react-native#master

Example 2: how to run a cloned react native project

...
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation project(':ReactAndroid')

    ...
}
...

Example 3: how to run a cloned react native project

...
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'de.undercouch:gradle-download-task:4.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
...