Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier)#10

Closed
ParaskP7 wants to merge 7 commits intowp-forkfrom
update/gradle-to-7.3.3-agp-to-7.0.4
Closed

Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier)#10
ParaskP7 wants to merge 7 commits intowp-forkfrom
update/gradle-to-7.3.3-agp-to-7.0.4

Conversation

@ParaskP7
Copy link
Copy Markdown

@ParaskP7 ParaskP7 commented Feb 16, 2022

This PR is part of Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier) PR. There are 13 libraries that are upgraded to Gradle 7.4 & AGP 7.1.1 (& Disable Jetifier).


All those PRs follow the general outline below:

  • Gradle version upgraded to 7.3.3 with the ./gradlew wrapper --gradle-version=7.3.3 --distribution-type=all command.
  • AGP version upgrade to 7.0.4 (see android/settings.gradle.kts change).
  • Build output diff:
    • To identify and fix new warnings/errors that got added.
    • To identify and verify old warnings/errors that got removed.
  • Lint output diff
    • To identify and fix new warnings/errors that got added.
    • To identify and verify old warnings/errors that got removed.
  • The above 4 steps were redone with a follow-up update to Gradle 7.4 & AGP 7.1.1.
  • Jetifier drop (see android/gradle.properties change).
  • Version bump to 3.2.0-wp-3 (see package.json).
  • Tarball update to 3.2.0-wp-3 (see react-native-safe-area-context-3.2.0-wp-3.tgz).
  • The build was also verified through Jitpack (see build.log).

FYI: There exist an android-build job that fails, but this relates to the Android example app project, which is knowingly and explicitly ignored as we are not interested in updating this project at this point.


To test - Now

These changes can be tested as part of the gutenberg PR which is updated to use the temporarily non-tagged node module project dependencies generated with these changes.

To test - Later ⚙️

These changes can be tested as part of the gutenberg-mobile PR ⚙️ or WordPress-Android PR ⚙️ which is updated to use the bundle ⚙️ generated with these changes.

FYI: It's best to leave the testing step to the gutenberg PR review since even if these PRs are merged, they won't impact anything until the package.json file is updated. Worst case scenario, a follow up PR will get opened to fix any issues that are found during testing.


Follow up

Once these PRs are merged in, a new tag will get created for each library and the package.json file will be again updated accordingly.

@ParaskP7 ParaskP7 added the enhancement New feature or request label Feb 16, 2022
@ParaskP7 ParaskP7 requested a review from oguzkocer February 16, 2022 10:50
@ParaskP7 ParaskP7 self-assigned this Feb 16, 2022
Copy link
Copy Markdown

@oguzkocer oguzkocer left a comment

Choose a reason for hiding this comment

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

I am approving the PR to keep things moving, but the CI error seems to be new, so might be worth a look. I think the android build will still fail, but the error should be related to NDK (which is the issue we have in trunk) and not the software component. The more important thing is that Jitpack is able to build and publish the library without issues in which case the CI can be ignored. Hopefully these forks will be removed soon, so I don't suggest spending too much time on it.

@ParaskP7
Copy link
Copy Markdown
Author

👋 @oguzkocer !

I am approving the PR to keep things moving, but the CI error seems to be new, so might be worth a look.

Thanks for approving! 👍

I will definitely take a look at it as some point, it's on my list for later. It seems to be related to the example app, which is anyway outdated (Gradle 6.2 & AGP 3.5.3), so I am not sure how much work this will require or if it is worth it. 🤔 Build android example app

I think the android build will still fail, but the error should be related to NDK (which is the issue we have in trunk) and not the software component.

👍 🤔

The more important thing is that Jitpack is able to build and publish the library without issues in which case the CI can be ignored.

👍 Btw, how were you able to verify that the Jitpack is able to build and publish the library? I need to learn how to do it so that maybe next time I can verify that myself. 😊

Hopefully these forks will be removed soon, so I don't suggest spending too much time on it.

👍

@ParaskP7
Copy link
Copy Markdown
Author

👋 @oguzkocer !

👍 Btw, how were you able to verify that the Jitpack is able to build and publish the library? I need to learn how to do it so that maybe next time I can verify that myself. 😊

Once more thanks for guiding me on this. 🥇

FYI: I just tried to do the same for the react-native-get-random-values node module fork library and it worked like a charm. 💎

Now I know. 🙇

The 'com.dipien.byebyejetifier' plugin was used to determine whether
Jetifier can be disable for this project.

After configuring 'Bye Bye Jetifier' and running the below command:
./gradlew canISayByeByeJetifier -Pandroid.enableJetifier=false

The output was clear, Jetifier can be now safely disabled for this
project: > Task :canISayByeByeJetifier

=========================================
Project: :
=========================================
 * No legacy android support usages found

===================================================== ...
* No dependencies with legacy android support usages! ...
===================================================== ...

... ===============================
... You can say Bye Bye Jetifier. *
... ===============================
@ParaskP7 ParaskP7 changed the title Upgrade Gradle to 7.3.3 & AGP to 7.0.4 Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier) Feb 24, 2022
@fluiddot
Copy link
Copy Markdown

Closing this PR as the repository will be archived (more info in #11), so, no need for further work on it. Thank you for the hard work on this far folks! ❤️

@fluiddot fluiddot closed this Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants