Unverified Commit f802e639 authored by 姚春锋's avatar 姚春锋 Committed by GitHub

skip 'generateLockfiles' for add-to-app project. (#91458)

parent 83ccb77e
...@@ -137,14 +137,16 @@ class FlutterPlugin implements Plugin<Project> { ...@@ -137,14 +137,16 @@ class FlutterPlugin implements Plugin<Project> {
this.project = project this.project = project
def rootProject = project.rootProject def rootProject = project.rootProject
rootProject.tasks.register('generateLockfiles') { if (isFlutterAppProject()) {
rootProject.subprojects.each { subproject -> rootProject.tasks.register('generateLockfiles') {
def gradlew = (OperatingSystem.current().isWindows()) ? rootProject.subprojects.each { subproject ->
"${rootProject.projectDir}/gradlew.bat" : "${rootProject.projectDir}/gradlew" def gradlew = (OperatingSystem.current().isWindows()) ?
rootProject.exec { "${rootProject.projectDir}/gradlew.bat" : "${rootProject.projectDir}/gradlew"
workingDir rootProject.projectDir rootProject.exec {
executable gradlew workingDir rootProject.projectDir
args ":${subproject.name}:dependencies", "--write-locks" executable gradlew
args ":${subproject.name}:dependencies", "--write-locks"
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment