-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 #21680
[Build] Update Gradle to 8.12.1 and AGP to 8.8.1 #21680
Conversation
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://developer.android.com/build/releases/ gradle-plugin
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
This Lint warning can be suppressed because 'NoCredentialException' is actually a subclass of 'GetCredentialException', which means that it is already caught. Warning Message: "Call to CredentialManager.getCredential without use of NoCredentialException" Explanation: "When calling CredentialManager.getCredential or CredentialManager.getCredentialAsync, you should handle NoCredentialException somewhere in your project. More info: https://developer.android.com/identity/sign-in/ credential-manager#handle-exceptions"
I18n is not actually needed on these specific cases. Warning Messages: "Number formatting does not take into account locale settings. Consider using String.format instead." Explanation: "When calling TextView#setText * Never call Number#toString() to format numbers; it will not handle fraction separators and locale-specific digits properly. Consider using String#format with proper format specifications (%d or %f) instead. * Do not pass a string literal (e.g. "Hello") to display text. Hardcoded text can not be properly translated to other languages. Consider using Android resource strings instead. * Do not build messages by concatenating text chunks. Such messages can not be properly translated. More info: https://developer.android.com/guide/topics/resources/ localization.html"
Generated by 🚫 Danger |
Build environment changesContent exceeds 65400 characters. Navigate to Buildkite build artifacts to see details. |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21680-b9e2e1b | |
Commit | b9e2e1b | |
Direct Download | wordpress-prototype-build-pr21680-b9e2e1b.apk |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21680-b9e2e1b | |
Commit | b9e2e1b | |
Direct Download | jetpack-prototype-build-pr21680-b9e2e1b.apk |
libs/login/src/main/java/org/wordpress/android/login/webauthn/PasskeyRequest.kt
Show resolved
Hide resolved
This 'Gutenberg Kit' PR hash updates the library to that branch version where 'Gradle & AGP' is also upgraded to version '8.12.1 & 8.8.0' respectively. Gutenberg Kit PR: https://github.com/wordpress-mobile/ GutenbergKit/pull/92 This step is required in order to check that these 'Gutenberg Kit' related changes work as expected for JP/WPAndroid.
👋 @dcalhoun, about this, I just wanted to share the progress done so far so that you know what to expect reviewing/supporting this work to completion next week.
FYI: I'll now mark this as PS: Let me know if I am missing something in terms of how to progress this. With GBM, we followed a similar process, thus, I just copied that. Not sure if the same applies to GBKit and to what extend. 🙏 Footnotes
|
Results from my first round with this: ✅ Smoke test both apps without composite builds The composite build fails with, "Using multiple versions of the Android Gradle Plugin [8.8.0, 8.5.1] across Gradle builds is not allowed," but that's expected until the GBK update is ready. |
👋 @nbradbury and thanks for the review/testing! 🙇
Actually, that's why I already created this GBKit#92 PR too. Now, if you first checkout this PR locally, which will point this repo to Hope that helps resume you testing this path as well. 🙏 |
… into build/update-gradle-to-8.12.1-and-agp-to-8.8
This 'Gutenberg Kit' PR hash updates the library to that branch version where 'Gradle & AGP' is also upgraded to version '8.12.1 & 8.8.0' respectively. Gutenberg Kit PR: https://github.com/wordpress-mobile/ GutenbergKit/pull/92 This step is required in order to check that these 'Gutenberg Kit' related changes work as expected for JP/WPAndroid.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #21680 +/- ##
=======================================
Coverage 39.41% 39.41%
=======================================
Files 2122 2122
Lines 99570 99570
Branches 15324 15324
=======================================
Hits 39247 39247
Misses 56844 56844
Partials 3479 3479 ☔ View full report in Codecov by Sentry. |
… into build/update-gradle-to-8.12.1-and-agp-to-8.8
Release Notes: https://developer.android.com/build/releases/ gradle-plugin
This 'Gutenberg Kit' PR hash updates the library to that branch version where 'Gradle & AGP' is also upgraded to version '8.12.1 & 8.8.1' respectively. Gutenberg Kit PR: https://github.com/wordpress-mobile/ GutenbergKit/pull/92 This step is required in order to check that these 'Gutenberg Kit' related changes work as expected for JP/WPAndroid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test plan succeeded for me aside from one ./gradlew lintJetpackVanillaRelease
error, but this appears to be present in trunk
as well. So, I think it is safe to merge this.
I'll let others more experienced in Android development provide formal PR approval. Thank you for completing this upgrade. 🙇🏻♂️
android/Gutenberg/src/main/java/org/wordpress/gutenberg/GutenbergView.kt:144: Error: The intent action android.intent.action.VIEW (used to start an activity) matches the intent filter of a non-exported component org.wordpress.android.ui.JetpackConnectionResultActivity from a manifest. If you are trying to invoke this specific component via the action then you should make the intent explicit by calling Intent.set{Component,Class,ClassName}. [UnsafeImplicitIntentLaunch]
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(it))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Awesome @dcalhoun , thanks for testing and verifying that everything is working as expected! 🙇 🎉 🚀 PS: Yea, about the
Great, so, after we get a 👍 on this from @nbradbury (and maybe also @wzieba) , we can go ahead and merge this GBKit#92 PR and more forward with the rest of the |
Correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome @nbradbury , thanks for taking a final look at it! 🙇❤️🚀 |
… into build/update-gradle-to-8.12.1-and-agp-to-8.8
Awesome folks, I got all the 👍s I needed to proceed with the rest of the merge instructions, I am currently on it, starting with merging GBKit#92, thank YOU all! 🙇 🏃 |
This 'Gutenberg Kit' trunk hash updates the library to that branch version where 'Gradle & AGP' is also upgraded to version '8.12.1 & 8.8.1' respectively. Gutenberg Kit PR: https://github.com/wordpress-mobile/ GutenbergKit/pull/92 This step is required in order to check that these 'Gutenberg Kit' related changes work as expected for JP/WPAndroid.
|
Issue: apps-infra-plans#174
Depends On (
for local builds
): GBKit#92Description
This PR updates Gradle to 8.12.1 and AGP to 8.8.1 (context).
Review
During review, please take a closer look at the below commits:
To Test:
Testing Steps
For example, all main jobs of this initial build on CI seem to take a bit longer than usual:
20m 30s
(scan)19m 34s
(scan)24m 12s
(scan)27m 20s
(scan)20m 15s
(scan)5m 5s
(scan)5m 43s
(scan)13m 20s
(scan)10 59s
(scan)This is because dependency resolution and network activity skyrocketed, from a few seconds, to minutes again, from just a couple of hundred network requests to 3-4K of those, effectively ignoring the dependency cache altogether. This is expected due to the bump in Gradle versions, from
8.8.1
to8.12.1
. This diff will go back to normal as soon as this PR get merged and a fresh copy of dependency cache is saved.metadata-2.106
is used withGradle 8.2 to Gradle 8.10.2
andmetadata-2.107
is used withGradle 8.11 and above
. We are indeed creating/using a new metadata cache since Gradle is now updated to8.12.1
:Triggering another build on CI seems to make things much better, most probably because we now have a build cache available from the initial build. But, and as expected, the dependency cache problem still persists (scan).
./gradlew assembleJetpackVanillaRelease
or/and./gradlew assembleWordpressVanillaRelease
./gradlew lintJetpackVanillaRelease
or/and./gradlew lintWordpressVanillaRelease
Check build environment changes.Unfortunately, this is not possible due to thisContent exceeds 65400 characters.
problem. Good news are, that we are aware of this problem and plan to fix it, or else, work around it (see apps-infra-plans#182).Merge Instructions
Ready for review
.trunk
(after them being code reviewed and approved).trunk
hash or tag.[Status] Not Ready for Merge
label.Post Merge Instructions
Triggering schedules/dependency-cache.yml manually via this-> DoneNew Build
button to generate & save an update dependency cache.Look at newly started builds and verify that dependency cache restoration works as expected, with dependency resolution and network activity dropping to expected levels (just a couple of seconds for dependency resolution, close to zero of network activity).-> Done (see Lint Jetpack scan with few seconds of dependency resolution and zero network activity, as expected)Run another set of testing/benchmarking for CC on CI (based on [Configuration Cache] Disable Configuration Cache on CI (--> DoneV1
) #21659) and re-measuring whether disabling CC on CI actually helps reduce build times (or not), and if so by how much.Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
To Test
section above.What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):
N/A