[FEATURE REQUEST] Update Gradle version
We are currently using Gradle plugin v7.4.2
This is pretty much outdated and we could try to put it in a newer version.
https://developer.android.com/build/releases/gradle-plugin
I wouldn't set the newest one but also, i wouldn't keep such old one.
I guess, after the update, if app builds correctly we can give that as correct.
TASKS
- [ ] Research (if needed)
- [ ] Create branch feature/feature_name
- [ ] Development tasks
- [ ] Implement whatever
- [ ] ...
- [ ] Implement unit tests (if needed)
- [ ] Code review and apply changes requested
- [ ] Design test plan
- [ ] QA
- [ ] Merge branch feature/feature_name into master
@jesmrec May I move on with it to upgrade gradle version?
@AwaisKhan128 sorry, it was already assigned, i have just added it.
Just to make clear: Gradle and Android Gradle Plugin are different things.
- Gradle: it's the base build system to compile the whole project. It can be set in Android Studio going to
File > Project Structure > Project > Gradle Version. Currently we're using the 7.5 version. - Android Gradle Plugin: it's an extension for Gradle that provides the necessary tools to build Android apps. It can be set in
libs.version.tomlin theandroidGradlePluginvariable. Currently we're using the 7.4.2 version.
When we update the Android Gradle Plugin version, we also need to update the Gradle version (see compatibilities).
There is also an inter-dependency with the Java JDK version used.
- JDK: it's the Java version used to build and create the Android app. It can be set going to
Android Studio > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK. Currently we're using JBR 17, which stands for JetBrains Runtime and is an enhanced JDK of the corresponding version which includes optimizations for Android Studio.
There's a fantastic tool embedded in Android Studio that allows an assisted upgrade of the AGP version, with everything it implies (breaking changes, updating other necessary dependencies...). It lets the user decide about several questions introduced in newer AGP versions, and then performs automatically the necessary changes. This tool can be accessed by going to Tools > AGP Upgrade Assistant....
After performing some updates, the status of the different dependencies is the newest version for each of them:
- JDK: JBR 17
- Gradle: 8.9
- AGP: 8.7.2