You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll answer it once and for all here. The short answer is use blowdryer.
The longer answer is that File is a good interface. Sometimes the formatting happens within the JVM, but othertimes we are actually passing the file to a different process, and File works for either case.
So instead of overloading every method that takes a File to have another version that takes URL url and another that takes String localResource, what you really want is some function that takes a URL or local classpath resource and returns a File. That's simple to do, but there's some tricky bookkeeping - what should the name be, where should the file live, when do we reuse the same file, etc.
blowdryer answers all those questions with the shortest answer we could think of. It introduces no tasks - it creates the Files at configuration time and uses caching to support fully-offline builds and the best possible performance.
The text was updated successfully, but these errors were encountered:
It comes up from time to time that users want to setup their formatter steps from classpath resources and/or URLs. A few previous requests:
I'll answer it once and for all here. The short answer is use blowdryer.
The longer answer is that
File
is a good interface. Sometimes the formatting happens within the JVM, but othertimes we are actually passing the file to a different process, andFile
works for either case.So instead of overloading every method that takes a
File
to have another version that takesURL url
and another that takesString localResource
, what you really want is some function that takes a URL or local classpath resource and returns aFile
. That's simple to do, but there's some tricky bookkeeping - what should the name be, where should the file live, when do we reuse the same file, etc.blowdryer answers all those questions with the shortest answer we could think of. It introduces no tasks - it creates the
File
s at configuration time and uses caching to support fully-offline builds and the best possible performance.The text was updated successfully, but these errors were encountered: