[go: nahoru, domu]

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

Declare dependency on copyFlutterAssetsTask in bundleAarTask #137370

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
documentation
  • Loading branch information
Gray Mackall committed Oct 26, 2023
commit 86f9f7923b343f700152e69005925235e25496b1
11 changes: 9 additions & 2 deletions packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1130,12 +1130,19 @@ class FlutterPlugin implements Plugin<Project> {
variantOutput.processResourcesProvider.get() : variantOutput.processResources
processResources.dependsOn(copyFlutterAssetsTask)
}
// Task compressAssets uses the output of copyFlutterAssetsTask,
// so it's necessary to declare it as an dependency.
// The following tasks use the output of copyFlutterAssetsTask,
// so it's necessary to declare it as an dependency since Gradle 8.
// See https://docs.gradle.org/8.1/userguide/validation_problems.html#implicit_dependency.
def compressAssetsTask = project.tasks.findByName("compress${variant.name.capitalize()}Assets")
if (compressAssetsTask) {
compressAssetsTask.dependsOn copyFlutterAssetsTask
}

def bundleAarTask = project.tasks.findByName("bundle${variant.name.capitalize()}Aar")
if (bundleAarTask) {
bundleAarTask.dependsOn copyFlutterAssetsTask
}

return copyFlutterAssetsTask
} // end def addFlutterDeps

Expand Down