Unverified Commit 407668f4 authored by Emmanuel Garcia's avatar Emmanuel Garcia Committed by GitHub

Stop using deprecated features from Gradle (#40900)

parent f7173dcc
...@@ -627,16 +627,23 @@ class FlutterPlugin implements Plugin<Project> { ...@@ -627,16 +627,23 @@ class FlutterPlugin implements Plugin<Project> {
dependsOn cleanPackageAssets dependsOn cleanPackageAssets
into packageAssets.outputDir into packageAssets.outputDir
} else { } else {
dependsOn variant.mergeAssets // `variant.mergeAssets` will be removed at the end of 2019.
dependsOn "clean${variant.mergeAssets.name.capitalize()}" def mergeAssets = variant.hasProperty("mergeAssetsProvider") ?
variant.mergeAssets.mustRunAfter("clean${variant.mergeAssets.name.capitalize()}") variant.mergeAssetsProvider.get() : variant.mergeAssets
into variant.mergeAssets.outputDir dependsOn mergeAssets
dependsOn "clean${mergeAssets.name.capitalize()}"
mergeAssets.mustRunAfter("clean${mergeAssets.name.capitalize()}")
into mergeAssets.outputDir
} }
compileTasks.each { flutterTask -> compileTasks.each { flutterTask ->
with flutterTask.assets with flutterTask.assets
} }
} }
variant.outputs.first().processResources.dependsOn(copyFlutterAssetsTask) def variantOutput = variant.outputs.first()
// `variantOutput.processResources` will be removed at the end of 2019.
def processResources = variantOutput.hasProperty("processResourcesProvider") ?
variantOutput.processResourcesProvider.get() : variantOutput.processResources
processResources.dependsOn(copyFlutterAssetsTask)
} }
if (project.android.hasProperty("applicationVariants")) { if (project.android.hasProperty("applicationVariants")) {
project.android.applicationVariants.all addFlutterDeps project.android.applicationVariants.all addFlutterDeps
......
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