mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Clean up output directory before copying over new files (#14085)
* Clean up output directory before copying over new files * Use standard clean task command
This commit is contained in:
parent
6e38b42919
commit
09a6df7461
@ -321,6 +321,7 @@ class FlutterPlugin implements Plugin<Project> {
|
||||
Task copyFlxTask = project.tasks.create(name: "copyFlutterAssets${variant.name.capitalize()}", type: Copy) {
|
||||
dependsOn flutterTask
|
||||
dependsOn variant.mergeAssets
|
||||
dependsOn "clean${variant.mergeAssets.name.capitalize()}"
|
||||
into variant.mergeAssets.outputDir
|
||||
with flutterTask.assets
|
||||
}
|
||||
@ -453,18 +454,20 @@ class FlutterTask extends BaseFlutterTask {
|
||||
CopySpec getAssets() {
|
||||
return project.copySpec {
|
||||
from "${intermediateDir}"
|
||||
|
||||
include "flutter_assets/**" // the working dir and its files
|
||||
|
||||
if (buildMode != 'debug') {
|
||||
if (preferSharedLibrary) {
|
||||
include "${intermediateDir}/app.so"
|
||||
} else {
|
||||
include "vm_snapshot_data"
|
||||
include "vm_snapshot_instr"
|
||||
include "isolate_snapshot_data"
|
||||
include "isolate_snapshot_instr"
|
||||
}
|
||||
if (preferSharedLibrary) {
|
||||
include "${intermediateDir}/app.so"
|
||||
} else {
|
||||
include "vm_snapshot_data"
|
||||
include "vm_snapshot_instr"
|
||||
include "isolate_snapshot_data"
|
||||
include "isolate_snapshot_instr"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileCollection readDependencies(File dependenciesFile) {
|
||||
|
Loading…
Reference in New Issue
Block a user