Add a --no-gradle-generation mode to the generate_gradle_lockfiles.dart script#145568
Add a --no-gradle-generation mode to the generate_gradle_lockfiles.dart script#145568auto-submit[bot] merged 8 commits intoflutter:masterfrom
--no-gradle-generation mode to the generate_gradle_lockfiles.dart script#145568Conversation
| const String usageMessage = "Usage: find . -type d -name 'android' | dart dev/tools/bin/generate_gradle_lockfiles.dart\n" | ||
| 'If you would rather enter the files manually, just run `dart dev/tools/bin/generate_gradle_lockfiles.dart`,\n' | ||
| "enter the absolute paths to the app's android directory, then press CTRL-D.\n" | ||
| "If you don't wish to re-generate the settings.gradle, build.gradle, and gradle-wrapper.properties files,\n" |
There was a problem hiding this comment.
Shouldn't this be the opposite?
There was a problem hiding this comment.
Hmm as in default behavior, or just the documentation?
I think the documentation is correct as written (the default is to re-generate, the flag makes it not re-generate)
There was a problem hiding this comment.
Ahh ok, you're correct. I would recommend instead naming the flag gradle-generation, with the argument defaultsTo: true. This will implicitly create a --no-gradle-generation flag that will allow opt-out.
As for default behavior, I'm unclear. When would I want to regenerate these vs not generate them?
There was a problem hiding this comment.
Ahh ok, you're correct. I would recommend instead naming the flag
gradle-generation, with the argumentdefaultsTo: true. This will implicitly create a--no-gradle-generationflag that will allow opt-out.
I did not know this! Changed the flag and gave it true default (though I left the documentation as is because it is still true that you pass the --no-gradle-generation flag to not generate.
As for default behavior, I'm unclear. When would I want to regenerate these vs not generate them?
The main use case is batch updating the gradle files to new versions of Gradle/AGP/kotlin. I think the logic was originally included to add the lines:
buildscript {
dependencyLocking {
lockFile = file("${rootProject.projectDir}/buildscript-gradle.lockfile")
lockAllConfigurations()
}
}
to build.gradle files that didn't have them, but after that has been included once I think re-generating the gradle files is actually pretty orthogonal to the task of updating the lockfiles.
But in spite of that I still sort of soft lean towards defaulting to true because it doesn't make a big difference and it keeps the behavior in line with many breadcrumb comments I've made in the past
There was a problem hiding this comment.
ok, i'll leave it up to you (as probably the primary user). if/when I wire this up to the auto-roller, I'll be sure to opt out of regenerating those files.
…ockfiles.dart` script (flutter/flutter#145568)
…ockfiles.dart` script (flutter/flutter#145568)
…ockfiles.dart` script (flutter/flutter#145568)
flutter/flutter@18340ea...14774b9 2024-03-22 [email protected] Roll Flutter Engine from eba6e31498b8 to 09dadce76828 (1 revision) (flutter/flutter#145603) 2024-03-22 [email protected] Roll Flutter Engine from f9a34ae0b14f to eba6e31498b8 (1 revision) (flutter/flutter#145598) 2024-03-22 [email protected] Intensive `if` chain refactoring (flutter/flutter#145194) 2024-03-22 [email protected] Adds numpad navigation shortcuts for Linux (flutter/flutter#145464) 2024-03-22 [email protected] Roll Flutter Engine from 5a12de1beab7 to f9a34ae0b14f (1 revision) (flutter/flutter#145581) 2024-03-22 [email protected] Roll Flutter Engine from e2f324beac3b to 5a12de1beab7 (1 revision) (flutter/flutter#145578) 2024-03-22 [email protected] Replace `RenderBox.compute*` with `RenderBox.get*` and add `@visibleForOverriding` (flutter/flutter#145503) 2024-03-22 [email protected] Add some cross references in the docs, move an example to a dartpad example (flutter/flutter#145571) 2024-03-22 [email protected] Fix `BorderSide.none` requiring explicit transparent color for `UnderlineInputBorder` (flutter/flutter#145329) 2024-03-22 [email protected] Roll Flutter Engine from a46a7b273a5b to e2f324beac3b (1 revision) (flutter/flutter#145576) 2024-03-21 [email protected] Fix nullability of getFullHeightForCaret (flutter/flutter#145554) 2024-03-21 [email protected] Add a `--no-gradle-generation` mode to the `generate_gradle_lockfiles.dart` script (flutter/flutter#145568) 2024-03-21 [email protected] Roll Flutter Engine from 1b842ae58b3d to a46a7b273a5b (2 revisions) (flutter/flutter#145569) 2024-03-21 [email protected] Fixed race condition in PollingDeviceDiscovery. (flutter/flutter#145506) 2024-03-21 [email protected] Roll Flutter Engine from a2ed373fa70f to 1b842ae58b3d (1 revision) (flutter/flutter#145565) 2024-03-21 [email protected] Clarify AutomaticKeepAliveClientMixin semantics in build method (flutter/flutter#145297) 2024-03-21 [email protected] Eliminate more window singleton usages (flutter/flutter#145560) 2024-03-21 [email protected] `flutter test --wasm` support (flutter/flutter#145347) 2024-03-21 [email protected] Roll Flutter Engine from eb262e9c34db to a2ed373fa70f (2 revisions) (flutter/flutter#145556) 2024-03-21 [email protected] Roll Flutter Engine from bad4a30e1c75 to eb262e9c34db (1 revision) (flutter/flutter#145555) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ockfiles.dart` script (flutter/flutter#145568)
The script currently overwrites existing
settings.gradle,build.gradle, andgradle-wrapper.propertiesfiles in the directories it processes. This mode makes it not do that, and just generate the lockfiles themselves.Related to #145564 (comment)
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.