gkeenley
gkeenley

Reputation: 7388

Does React Native come with Gradle?

I read in a Github post "I am using react-native v0.59.9 which uses gradle v5.4.1.". I've used React Native for a while and been able to emulate on Android, but don't recall ever installing Gradle. When I create a React Native app, does it automatically come with Gradle? If so, is there ever a need for me to worry about the Gradle version, or does a given React Native version always come with the corresponding Gradle version?

Upvotes: 5

Views: 2012

Answers (1)

Gaurav Roy
Gaurav Roy

Reputation: 12215

When you install pure react-native app, (i.e not expo) , it comes with 2 directories, one android and the other ios respectively.

So react native uses Gradle for building automation purposes , like generating signed or unsigned APK from the terminal itself.

Similarly in IOS , react native uses cocoapods to download any external native dependencies. And hence , gradle versions is bundled along with the React native app. Feel free to ask any doubts.

Below are the commands to generate signed apk from android directory in React native:

./gradlew assembleRelease -x bundleReleaseJsAndAssets

Upvotes: 4

Related Questions