Sorry for late reply. Somehow I didn't get notification about your new post in this thread.
I've just published smooth 0.8.0 that fixes problem with newFile() function. As you suggested I created two new functions:
Blob toBlob(String string)
File toFile(Blob content, String path)
and removed newFile() function
Full release notes as usual available on blog: http://smooth-build.blogspot.com/2013/12/smooth-build-ver-080.html
2) changing file paths:
You are right, smooth way of doing it would be this:
files("game/lib") || moveFile("bin")
I would rather name it prefixPath - feels more natural in functional world.
In current implementation you have to build it 'manually':
fileInBinDirectory: [ toFile(game.jar, "bin/game.jar"), toFile(util.jar, "bin/util.jar") ];
At the moment I think I would have to load each seperately, until the parallel piping is implemented(I am assuming it would output results back as an array?
Yes, parallel piping will output array. So you could write:
png.jar: files("data/svg") || convertSvgToPng | zip;
4) including sub-scripts.
It is not currently possible but it is something I want to have. The problem is that it's much trickier to get right than it looks. Following problems need to be solved/decided (I assume we have project/build.smooth that calls project/subproject/build.smooth).
a) when function from project/build.smooth calls function from subproject where results should be cached? in project/.smoth/values/ or project/subproject/.smooth/values/. Second option allows you to reuse cached values when you run this function directly via project/subproject/build.smooth but is more difficult to implement (Caching becomes more 'distributed')
b) Should included script share the same namespace (So having the same function name in both will be forbidden.) ?
Or should imported script be put in some new namespace so calls to its function would have to be prepended with the namespaces like this:
If so where to declare the name of that namespace? Inside subproject build.smooth or in the line that includes it inside parent build.smooth?
c) Soon I will add plugin system - You will be able to write your own smooth function implemented in java and use it in your script. Plugins will use namespaces to avoid name collisions same way as scripts. Should there be one command that could include other functions no matter whether they are stored in some plugin jar file or other smooth script or should it be completely separate functionality - for example plugins could be included by placing appropriate jar files in some predefined .smooth/plugins directory.
There's probably more problems but these three come first when I think about it. I do not want to act to hastily to implement something monstrous that would cause problems in future. Anyway there's a few more urgent (more useful features) like parallel piping, multithreading etc. However if you convince me that script including is your favorite feature I can reorder my priorities