blowdryer icon indicating copy to clipboard operation
blowdryer copied to clipboard

blowdryerInline

Open nedtwigg opened this issue 6 years ago • 0 comments

After using blowdryer for a bit, it's made our build files much easier to read, since all of our common patterns have been refactored into one repository and it's only the high-entropy stuff that's left to view. My biggest worry is that other people will have a hard time reading them, since they are now obfuscated a bit.

Here is a proposed enhancement. It's fine to implement only for groovy or only for kotlin - people who want the other would benefit hugely from the existing as a guide.

Viewing a blowdryer-enhanced project

If you are working with a project that uses blowdryer, especially someone else's project, it can be confusing to track down the build scripts they are calling out to. To address this, you can use gradlew blowdryerInline and it will do the following:

  • for every gradle file (foo.gradle) which uses blowdryer.file()
  • write out a new temp gradle file (foo.blowdryer-inline.gradle)
  • where each call to blowdryer.file() has been recursively copy-pasted into the expanded file for easy viewing

You can limit this to just one file with gradlew blowdryerInline --file someFile.gradle

nedtwigg avatar Dec 18 '19 06:12 nedtwigg