Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECHNICAL] Update Android Gradle Plugin version #4478

Closed
10 tasks done
jesmrec opened this issue Sep 24, 2024 · 5 comments · Fixed by #4507
Closed
10 tasks done

[TECHNICAL] Update Android Gradle Plugin version #4478

jesmrec opened this issue Sep 24, 2024 · 5 comments · Fixed by #4507

Comments

@jesmrec
Copy link
Collaborator

jesmrec commented Sep 24, 2024

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 technical/gradle_update
  • Development tasks
    • Update JDK version
    • Update Gradle version
    • Update AGP version
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch technical/gradle_update into master
@AwaisKhan128
Copy link
Contributor

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

@jesmrec
Copy link
Collaborator Author

jesmrec commented Sep 30, 2024

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

@JuancaG05 JuancaG05 changed the title [FEATURE REQUEST] Update gradle version [FEATURE REQUEST] Update Gradle version Sep 30, 2024
@JuancaG05 JuancaG05 changed the title [FEATURE REQUEST] Update Gradle version [TECHNICAL] Update Gradle version Oct 28, 2024
@JuancaG05
Copy link
Collaborator

JuancaG05 commented Oct 28, 2024

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 JuancaG05 changed the title [TECHNICAL] Update Gradle version [TECHNICAL] Update Android Gradle Plugin version Oct 28, 2024
@JuancaG05
Copy link
Collaborator

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants