I’m trying to cope with Gradle’s missing support for non-local files, and so far my general approach has been to use custom task types. However, this has the annoying limitation of not being able to use any of the other pre-provided or custom task types such as ExecTask, CopyTask etc. After experimenting with possible solutions, I came across what seemed to be a viable solution that solves both problems: Mixing in custom classes into DefaultTask. However, it turned out this messes up task input deserialization as there must be different class loaders. This seems to be unnecessary to me and I’d like to know whether that’s going to change anytime soon. Being able to mix in stuff into DefaultTask without troubles would open up many nice possibilities for Gradle plugins.
I’ve created a minimal Gist to reproduce and outline the setup and behavior: https://gist.github.com/e-user/5502350