mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix FGP's generateLockfiles task always executing its action at configuration time (#162220)
 This PR attempts to fix #110559 This PR supersedes #147837 Original attempt at fixing this by @GaryQian: #112723 ## 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. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
This commit is contained in:
parent
052be9c41a
commit
015cfa88d4
@ -186,13 +186,15 @@ class FlutterPlugin implements Plugin<Project> {
|
||||
Project rootProject = project.rootProject
|
||||
if (isFlutterAppProject()) {
|
||||
rootProject.tasks.register("generateLockfiles") {
|
||||
rootProject.subprojects.each { subproject ->
|
||||
String gradlew = (OperatingSystem.current().isWindows()) ?
|
||||
"${rootProject.projectDir}/gradlew.bat" : "${rootProject.projectDir}/gradlew"
|
||||
rootProject.exec {
|
||||
workingDir(rootProject.projectDir)
|
||||
executable(gradlew)
|
||||
args(":${subproject.name}:dependencies", "--write-locks")
|
||||
doLast {
|
||||
rootProject.subprojects.each { subproject ->
|
||||
String gradlew = (OperatingSystem.current().isWindows()) ?
|
||||
"${rootProject.projectDir}/gradlew.bat" : "${rootProject.projectDir}/gradlew"
|
||||
rootProject.exec {
|
||||
workingDir(rootProject.projectDir)
|
||||
executable(gradlew)
|
||||
args(":${subproject.name}:dependencies", "--write-locks")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user