-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
Fix Gradle 7 warnings that are now errors in Gradle 8 #121958
Fix Gradle 7 warnings that are now errors in Gradle 8 #121958
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Did you check that you can build your app with Gradle 8? Because I'm pretty sure you can't. See issue #117043 (specifically this comment), which was a warning in Gradle 7.x but is a fatal error in Gradle 8. |
We can test this by updating one of the tests to use Gradle 8. See #88540 for an example on the last time we did an upgrade to Gradle 7. |
Sorry, I messed up here and I thought it was running properly. 🥲 |
@CaseyHillers Thank you for the hint!. I updated one benchmark test to Gradle 8 and hope it works |
@@ -14,7 +14,7 @@ buildscript { | |||
} | |||
|
|||
dependencies { | |||
classpath 'com.android.tools.build:gradle:7.2.0' | |||
classpath 'com.android.tools.build:gradle:7.3.0' |
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.
This test doesn't run on presubmit (see https://github.com/flutter/flutter/blob/master/.ci.yaml). @reidbaker do you know of any presubmit tests we could uprev to verify the gradle 8 change?
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.
@camsim99 Is this something you could help with?
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.
I think I got it. Needed to run dev/tools/bin/generate_gradle_lockfiles.dart
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.
Did it run in presubmit? It will for sure run if you modify the ci.yaml file @CaseyHillers linked above to see a successful run, then revert the change. For instance, you can take the related tasks like this one and change presubmit: false
to presubmit: true
.
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.
Ok @camsim99. I will try it
…so/flutter into 112858-fix-android-gradle-8
.ci.yaml
Outdated
@@ -1597,7 +1597,7 @@ targets: | |||
|
|||
- name: Linux_android complex_layout_android__compile | |||
recipe: devicelab/devicelab_drone | |||
presubmit: false | |||
presubmit: true |
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 is passing on presubmit. This LGTM once you remove the presubmit run here.
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.
Done
Thank you @bartekpacia ! Your comments was very helpful! |
I scheduled a re-run of |
Fix Gradle 7 warnings that are now errors in Gradle 8
Pull the minimal set of changes from flutter 3.10 (in beta) into flutter 3.7 to support gradle 8.0 [124838](#124838) [Original PR](#121958) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. --------- Co-authored-by: André Sousa <andrelvsousa@gmail.com>
Pave the way to migrating to Gradle 8.
Following the manual: https://docs.gradle.org/current/userguide/upgrading_version_7.html#abstractarchivetask_api_cleanup
Fix #112858
Pre-launch Checklist
///
).