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

[Build] Update Gradle to 8.12.1 and AGP to 8.8.1 #92

Merged
merged 10 commits into from
Feb 18, 2025

Conversation

ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Feb 12, 2025

Issue: apps-infra-plans#174
Required By (for local builds): WPAndroid##21680

What?

This PR updates Gradle to 8.12.1 and AGP to 8.8.1 (context).


Why?

This Gradle and AGP update is required by WPAndroid##21680 to avoid breaking local development abilities as it would severely deteriorate productivity (context).


How?

Updating Gradle and AGP versions that match the WPAndroid##21680 PR related Gradle and AGP versions.


Testing Instructions

  1. Verify that all the CI checks are successful.
  2. Smoke test the example app and verify everything is working as expected1.
  3. Follow the (3.) testing instructions on WPAndroid##21680 to test both apps, Jetpack and WordPress, using the composite builds.
  4. Try to test for build time increases both, locally and on CI.
  5. Locally, in addition to the debug variant, assemble/lint the release variant, and verify everything is working as expected.
    • Run: ./gradlew assembleRelease
    • Run: ./gradlew lintRelease

Accessibility Testing Instructions N/A

Screenshots or screencast N/A

Footnotes

  1. I tried following the README.md#Android instructions, starting the development server with the example app and all, but I am not sure I am doing it the right way. I get an app being launched with a black screen, which then points me to the browser (opening Chrome), where I can then add title/description and do things with this GBKit. Not sure if that's how the example app is supposed to be tested locally (please guide me). PS: On android/local.properties -> GUTENBERG_EDITOR_URL, I am using the network URL that the development server points to. 🤔

Release Notes: https://developer.android.com/build/releases/
past-releases/agp-8-6-0-release-notes
Release Notes: https://docs.gradle.org/8.9/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.9
--distribution-type=all --gradle-distribution-sha256-sum=
258e722ec21e955201e31447b0aed14201765a3bfbae296a46cf60b70e66db70
Release Notes: https://developer.android.com/build/releases/
past-releases/agp-8-7-0-release-notes
Release Notes: https://docs.gradle.org/8.10.2/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.10.2
--distribution-type=all --gradle-distribution-sha256-sum=
2ab88d6de2c23e6adae7363ae6e29cbdd2a709e992929b48b6530fd0c7133bd6
Release Notes: https://docs.gradle.org/8.11.1/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.11.1
--distribution-type=all --gradle-distribution-sha256-sum=
89d4e70e4e84e2d2dfbb63e4daa53e21b25017cc70c37e4eea31ee51fb15098a
Release Notes: https://docs.gradle.org/8.12.1/release-notes.html

Command: ./gradlew wrapper --gradle-version=8.12.1
--distribution-type=all --gradle-distribution-sha256-sum=
296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
@ParaskP7 ParaskP7 added the [Type] Build Tooling Issues or PRs related to build tooling label Feb 12, 2025
@ParaskP7 ParaskP7 marked this pull request as ready for review February 13, 2025 14:19
@ParaskP7 ParaskP7 requested a review from dcalhoun February 13, 2025 14:19
@ParaskP7 ParaskP7 changed the title [Build] Update Gradle to 8.12.1 and AGP to 8.8 [Build] Update Gradle to 8.12.1 and AGP to 8.8.1 Feb 17, 2025
@ParaskP7
Copy link
Contributor Author

FYI: I just updated trunk again but most importantly I included the new patch version of AGP (8.8.1) so that when this PR is merged we get all the fixes it includes.

Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

The test plan succeeded for me. Thank you for completing this upgrade. 🙇🏻‍♂️

I get an app being launched with a black screen, which then points me to the browser (opening Chrome), where I can then add title/description and do things with this GBKit.

No, launching the OS browser should not occur. The app's WebView should load GutenbergKit. I've encountered this issue as well. I have not identified the cause, but it occurs sporadically and I believe it may be related to Node.js server failures.

Specifically, it may relate to polyfills and bad caches. Temporarily removing the polyfills and restarting the Node.js server may fix the issue.

Polyfill removal diff

diff --git a/vite.config.js b/vite.config.js
index 7bc91b3..bfd8ff1 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -3,7 +3,6 @@
  */
 import { defineConfig } from 'vite';
 import react from '@vitejs/plugin-react';
-import { nodePolyfills } from 'vite-plugin-node-polyfills';
 
 export default defineConfig({
 	base: '',
@@ -11,7 +10,7 @@ export default defineConfig({
 		outDir: '../dist',
 		target: 'esnext',
 	},
-	plugins: [nodePolyfills(), react()],
+	plugins: [react()],
 	root: 'src',
 	css: {
 		preprocessorOptions: {

@ParaskP7
Copy link
Contributor Author

The test plan succeeded for me. Thank you for completing this upgrade. 🙇🏻‍♂️

Awesome @dcalhoun , thank you so much for reviewing and testing this change! 🙇 ❤️ 🚀

No, launching the OS browser should not occur. The app's WebView should load GutenbergKit. I've encountered this issue as well. I have not identified the cause, but it occurs sporadically and I believe it may be related to Node.js server failures.

This is great to know, I am glad this (at least) worked on your side as expected! 👍

Specifically, it may relate to polyfills and bad caches. Temporarily removing the polyfills and restarting the Node.js server may fix the issue.

Awesome, thanks for sharing this diff, I'll definitely use it next time I'll need it. 💯

@ParaskP7
Copy link
Contributor Author

FYI: Now that I got the 👍s on this I am going to merge this and continue with the rest of the merge instruction steps within JP/WPAndroid#21680.

@ParaskP7 ParaskP7 merged commit c7efee1 into trunk Feb 18, 2025
9 checks passed
@ParaskP7 ParaskP7 deleted the build/update-gradle-to-8.12.1-and-agp-to-8.8 branch February 18, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants