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

Fix IDE Gradle sync being slow because of lockfile generation #147837

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bartekpacia
Copy link
Member

@bartekpacia bartekpacia commented May 4, 2024

I lost way too much time waiting for Gradle syncs to finish because of this problem, so I decided to take a stab at it.

This PR attempts to fix #110559

Revival of #112723

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • 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].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@flutter-dashboard
Copy link

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 "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use 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.

@bartekpacia bartekpacia marked this pull request as draft May 4, 2024 20:51
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 4, 2024
@bartekpacia
Copy link
Member Author

Some notes/questions:

  • Are the lockfiles actually generated? If so, where? I ran ./gradlew :generateLockfiles --write-locks, but no .lockfile files were generated, neither in my app nor in Android plugins under ~/.pub-cache.
  • Why does "Sync project with Gradle files" in IntelliJ trigger lockfile generation on every sync, but when I build my app normally (./gradlew :app:assembleDebug), then lockfile generation isn't triggered?
  • How can I run the equivalent of "Sync project with Gradle files" from the terminal? I can image it might be useful for testing this.

cc gradle gurus @GaryQian @gmackall @reidbaker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android Gradle Sync is time-consuming
1 participant