android icon indicating copy to clipboard operation
android copied to clipboard

[FEATURE REQUEST] Update Gradle version

Open jesmrec opened this issue 1 year ago • 2 comments

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 avatar Sep 24 '24 11:09 jesmrec

@jesmrec May I move on with it to upgrade gradle version?

AwaisKhan128 avatar Sep 29 '24 07:09 AwaisKhan128

@AwaisKhan128 sorry, it was already assigned, i have just added it.

jesmrec avatar Sep 30 '24 07:09 jesmrec

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.toml in the androidGradlePlugin variable. 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).

JuancaG05 avatar Oct 28 '24 11:10 JuancaG05

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.

JuancaG05 avatar Nov 04 '24 07:11 JuancaG05

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

JuancaG05 avatar Nov 04 '24 10:11 JuancaG05