I have template files that come in as a zip archive from the buildscript dependencies block. I would like to be able to do something like this:
task mytask(type: Copy) {
from "classpath:/templates/v1/mytemplate.json"
expand([ ... ])
}
It would be great if ‘from’ could have an easy way to pull files from the classpath.
The closest thing I have found to be able to do this is here: Best practice for copying files from classpath. That however is almost 2 years old. Is there a better way to do what I want without having to write several lines of groovy code?
Recently I had to create a new custom plugin and did a search around to see if a better way than my two year old “technique” from the other post but unfortunately nothing came up. The suggestions here are as good as it gets right now I think