I’m trying to get the following copy task to work, but it keeps saying its UP-TO-DATE
task patchContainer(type: Copy) {
from files(new File("${projectDir}/../../../common/shared/run.sh"));
into "${containerHome}/bin"
}
task check << {
def src = new File("${projectDir}/../../../common/shared/run.sh")
def tgt = new File("${containerHome}/bin/run.sh")
println "src ${src.exists()}"
println "tgt ${tgt.exists()}"
}
% gradle -a patchContainer doubleCheck
:webapp:app:patchContainer UP-TO-DATE
:webapp:app:doubleCheck
src true
tgt false
BUILD SUCCESSFUL
Seems I can’t figure out the magic to properly pass a FileCollection that contains a file with paths containing “…” to the Copy tasks’s from property.
Agreed its not the most idea approach to begin with, but I’m refactoring a legacy build right now and need to keep both ant and gradle builds working functionally till we’re ready to switch exclusively to gradle at with point I’ll be free to move source files around more freely.
build.gradle -< It’s in here I need to get a handle on …/…/…/common/shared/run.sh
As I said, the layout is not idea and moving to gradle is part of a longer term effort to clean alot of this up and start adopting some modern build best practices, but in the meantime, I’m just trying to take some baby steps. Seems there is the ability to do things like this in ant, so I would assume gradle would make it possible too. I’m away from my laptop now, but that got me thinking that I’ll look to see how we do this in ant and maybe that will provide me with some inspiration. Thanks again.
When I uploadedArchives to “externalJarProject”, it properly installed the jars in the directory I specify above. However, in milestone-6, this seems to be broken. Now it installs the jars in gov.noaa.datadelivery.plugin_independent_jars