-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Fix FGP's generateLockfiles task always executing its action at configuration time #162220
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 FGP's generateLockfiles task always executing its action at configuration time #162220
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
756b26d to
95b6fe2
Compare
ThoughtThe benefit of using Gradle lockfiles is not documented anywhere on Flutter's website. I think it should be – I can imagine large scale apps want to have as reproducible builds as possible, but without using Gradle lockfiles, there's no guarantee of this (for Android build of their Flutter app). It wouldn't have to be a long doc, here's a draft. Improve reproducibility of your Android builds by enabling Gradle dependency lockingYour pub dependencies (and all their transitive dependencies) are already pinned to specific versions in the To improve the reproducibility of Android builds of your Flutter app, we recommend using Gradle dependency locking (sometimes called "Gradle lockfiles"). If you're already using concrete versions for all your dependencies in build.gradle (e.g., specifying exact versions like 8.7.3), Gradle lockfiles might seem redundant at first glance, but they can still serve a purpose.
Enable Gradle dependency locking in your appIn // ...
+buildscript {
+ dependencyLocking {
+ lockFile = file("${rootProject.projectDir}/buildscript-gradle.lockfile")
+ lockAllConfigurations()
+ }
+}
plugins {
id("dev.flutter.flutter-plugin-loader")
// ...In subprojects {
project.evaluationDependsOn(":app")
+ dependencyLocking {
+ ignoredDependencies.add("io.flutter:*")
+ lockFile = file("${rootProject.projectDir}/project-${project.name}.lockfile")
+ if (!project.hasProperty("local-engine-repo")) {
+ lockAllConfigurations()
+ }
+ }
}Now run |
95b6fe2 to
ab277d5
Compare
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
…at configuration time (flutter/flutter#162220)
This PR attempts to fix #110559
This PR supersedes #147837
Original attempt at fixing this by @GaryQian: #112723
Pre-launch Checklist
///).