Skip to content

Conversation

@anod
Copy link
Member

@anod anod commented Feb 24, 2023

Upgrade Android Gradle Plugin to support for Android Studio 2022.1.1

#1095

Breaking build change: use Java 11 to build the project

Upgrade android gradle plugin 4.0.1 -> 7.3.1
Upgrade gradle 6.1.1 -> 7.5

  • Upgrade default NDK for gradle 7.5: 21.1.6352462 -> 23.1.7779620
    Upgrade room 2.2.6 -> 2.4.3
    Update compileSdkVersion 29 -> 32

@anod anod added the Android Android-related SDK issues label Feb 24, 2023
Copy link
Contributor

@sid-dahiya sid-dahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is updating a lot of the core Android versioning and can lead to app teams to run into issue as there are teams that need to support older Android versions. Is there any explicit requirement to move to these SDK versions?

@anod
Copy link
Member Author

anod commented Feb 24, 2023

This PR is updating a lot of the core Android versioning and can lead to app teams to run into issue as there are teams that need to support older Android versions. Is there any explicit requirement to move to these SDK versions?

Is there a specific library that can cause a problem?
The change just provides a new defaults and doesn't update minimum requirements,
also configuration allows to override existing values for custom build via tools.gradle.user file or env variables

@sid-dahiya
Copy link
Contributor

This PR is updating a lot of the core Android versioning and can lead to app teams to run into issue as there are teams that need to support older Android versions. Is there any explicit requirement to move to these SDK versions?

Is there a specific library that can cause a problem? The change just provides a new defaults and doesn't update minimum requirements, also configuration allows to override existing values for custom build via tools.gradle.user file

My bad! I misread the changes are for defaults.

@lalitb
Copy link
Contributor

lalitb commented Feb 27, 2023

Seems CI build is failing for latest gradle version -
No matching variant of com.android.tools.build:gradle:7.4.1

Do we need to install this in CI pipeline explicitly?

@anod
Copy link
Member Author

anod commented Feb 27, 2023

Seems CI build is failing for latest gradle version - No matching variant of com.android.tools.build:gradle:7.4.1

Do we need to install this in CI pipeline explicitly?

Looking into that... usually not needed unless pipeline not overriding something

@anod anod force-pushed the algavris/upgrade-gradle branch from 73ce3b4 to 966d493 Compare February 27, 2023 22:05
@anod
Copy link
Member Author

anod commented Feb 27, 2023

@lalitb I think I figred out the build error.

New gradle plugin requires Java 11, but android sdk tools instaled via choc are outdated.

There is an action to install newer SDK tools (https://github.com/marketplace/actions/setup-android-sdk-tools)

Is it ok to use the action or I new to download new version manually?

@anod anod force-pushed the algavris/upgrade-gradle branch from 494181b to 0827e94 Compare February 28, 2023 01:48
@anod
Copy link
Member Author

anod commented Feb 28, 2023

@lalitb I think I figred out the build error.

New gradle plugin requires Java 11, but android sdk tools instaled via choc are outdated.

There is an action to install newer SDK tools (https://github.com/marketplace/actions/setup-android-sdk-tools)

Is it ok to use the action or I new to download new version manually?

On second thought probably we don't want to upgrade java yet, this needs to be communicated, so I will lower grade build plugin to previous version

@lalitb
Copy link
Contributor

lalitb commented Feb 28, 2023

On second thought probably we don't want to upgrade java yet, this needs to be communicated, so I will lower grade build plugin to previous version

Yes I think upgrade Java needs to be well communicated.

@anod anod force-pushed the algavris/upgrade-gradle branch 2 times, most recently from 0e68ff8 to 3bca249 Compare February 28, 2023 13:16
@anod anod marked this pull request as draft March 2, 2023 09:17
@anod
Copy link
Member Author

anod commented Mar 2, 2023

Looks like Java 11 is required for running new build, I will prepare the PR to use java 11 and once we agreed on timelines will publish

@anod anod force-pushed the algavris/upgrade-gradle branch 6 times, most recently from 5e24665 to 558a8b8 Compare March 28, 2023 16:36
@anod anod force-pushed the algavris/upgrade-gradle branch 7 times, most recently from 241378e to addd5de Compare March 30, 2023 15:28
@anod anod changed the title Upgrade android libraries Upgrade android libraries [Java 11 build] Mar 30, 2023
@anod anod requested a review from sid-dahiya March 30, 2023 16:52
@anod anod marked this pull request as ready for review March 30, 2023 16:52
@anod anod requested a review from ThomsonTan as a code owner March 30, 2023 16:52
@anod anod force-pushed the algavris/upgrade-gradle branch from addd5de to d2ac8e1 Compare March 30, 2023 16:54
@anod anod changed the title Upgrade android libraries [Java 11 build] Upgrade android gradle plugin [Java 11 build] Mar 30, 2023
@anod anod force-pushed the algavris/upgrade-gradle branch from 84ac22a to c118a26 Compare April 24, 2023 04:26
@anod
Copy link
Member Author

anod commented Apr 24, 2023

@lalitb @sid-dahiya Can you please take a look on the latest iteration, I would like to complete it next week

Breaking build change: use Java 11 to build the project

Upgrade  android gradle plugin 4.0.1 -> 7.3.1
Upgrade gradle 6.1.1 -> 7.5
 - Upgrade default NDK for gradle 7.5: 21.1.6352462 -> 23.1.7779620
Upgrade room 2.2.6 -> 2.4.3
Update compileSdkVersion 29 -> 32
@anod anod force-pushed the algavris/upgrade-gradle branch from c118a26 to 4cf2952 Compare April 30, 2023 16:38
Copy link
Contributor

@mkoscumb mkoscumb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anod anod merged commit e54fb75 into main May 4, 2023
@anod anod deleted the algavris/upgrade-gradle branch May 4, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android Android-related SDK issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants