wojtek
(Wojtek)
1
In regular task inside build.gradle.kts
file we can do
copy {
from(zipTree("${zipfilepath}"))
into("${destinationPath}")
}
but it doesn’t work in custom task implementation. Are there any convenience methods or the only way is to do regular implementation?
Vampire
(Björn Kautler)
2
As a start, you would most often want to not use copy { ... }
, but sync { ... }
to not have stale files lying around.
Besides that, in a full task class you would inject an instance of ArchiveOperations
which have the sync
and copy
methods.
wojtek
(Wojtek)
3
Thanks a lot! With this I managed to create custom tasks (though there are some problems with config-cache but I disabled those for now…)
Vampire
(Björn Kautler)
4
Which problems are there?