I have a basically unmodified react native project that takes almost an hour to build. It was taking 15 minutes until I made a few small tweaks (which were supposed to speed things up) and now it takes an hour. I've included two custom modules (react-native-webrtc and react-native-nodejs-mobile). I did a build scan and it just says the main gradle files are the culprits. Most things take seconds.
app/build.gradle Script 5m 57.428s (7m 36.999s total) Applied to 1 project 3 tasks created /project/node_modules/@react-native-community/cli-platform-android/native_modules.gradle Script 3m 52.452s Applied to 2 projects settings.gradle Script 3m 0.513s (5m 18.035s total) Applied to 1 project assembleRelease took an hour before I made any changes. I'm now working on getting assembleDebug back to 15 minutes.