Matthew Von-Maszewski
11/04/2024, 3:17 PMtask unZipSource(type:Copy) {
from(zipTree("$buildDir/v7.3.1.zip")) {
eachFile { fcd ->
fcd.relativePath = new RelativePath(true, fcd.relativePath.segments.drop(1))
}
}
destinationDir projectDir
inputs.file("$buildDir/v7.3.1.zip")
outputs.file("$projectDir/AUTHORS")
dependsOn downloadSource
}Martin
11/04/2024, 3:20 PMMatthew Von-Maszewski
11/04/2024, 3:22 PMMatthew Von-Maszewski
11/04/2024, 3:22 PMMatthew Von-Maszewski
11/04/2024, 3:30 PMMartin
11/04/2024, 3:30 PMMartin
11/04/2024, 3:30 PMMartin
11/04/2024, 3:31 PM-i it will show you why the task is not up-to-dateMatthew Von-Maszewski
11/04/2024, 3:44 PMVampire
11/04/2024, 3:48 PMVampire
11/04/2024, 3:49 PMVampire
11/04/2024, 3:50 PMtype and instead use copy { ... } inside a doLast { ... } action and declare the input and output file properly, then you should hopefully get the result you intended.Matthew Von-Maszewski
11/04/2024, 3:51 PMMatthew Von-Maszewski
11/04/2024, 3:51 PMVampire
11/04/2024, 3:52 PMdependsOn where you do not have a lifecycle task on the left-hand side is a code smell and a sign that you do something wrong, like not wiring task output to task inputs, but configuring paths manually which you shouldn't doMatthew Von-Maszewski
11/04/2024, 3:53 PMMatthew Von-Maszewski
11/04/2024, 3:54 PMVampire
11/04/2024, 3:54 PMtask unZipSource {
inputs.files(downloadSource)
outputs.file("$projectDir/AUTHORS")
doLast {
copy {
from(zipTree(downloadSource.outputs.files.singleFile)) {
eachFile { fcd ->
fcd.relativePath = new RelativePath(true, fcd.relativePath.segments.drop(1))
}
}
}
destinationDir projectDir
}
}
or something along those lines.Matthew Von-Maszewski
11/04/2024, 3:56 PM