Update to AGP 3.6
TLDR:
- Update your android studio to 3.6
- After pull from latest branch, ./gradlew --stop to kill previous daemon. If you find strange error just ./gradlew clean for the first run after update.
- Pr: https://github.com/traveloka/android-v3/pull/8125/files
- Please let us know if you have issue after this update
changes:
- Update AGP 3.6: https://developer.android.com/studio/releases/#3-6-0
- Fixed some issues and faster R compilation
- Update to Gradle 6.1.1: https://docs.gradle.org/6.1.1/release-notes.html
- Changing JVM Settings
- Re-enable workers api on kapt (kapt.use.worker.api=true), this was disabled due some issues and seems no longer happen on this release. Enabling this will moving most of the work to the main process, so we need to adjust JVM settings by reducing kotlin gradle to 2gb.
- Disable G1GC since this version will use less memory and more stable daemon.
- Set -xms on maing radle to reduce heap expansion cost
- Reduces max workers and kotlin max parallel to reduce memory usage (as google engineer suggest us to do this).
- Total max heap reduced from 10gb (5+5) to 8gb(6+2) with current setting. For debug build the main Gradle only use 4-5gb in average, but for staging it need at least 6gb.