eriwen/gradle-js-plugin — pull request #60 by jamiefolson (2013-02-21 04:28:06+00:00)
Title: Adding support for ClosureBuilder and DepsWriter python tools

Should be pretty self-explanatory. This improves support for Google Closure by incorporating the closurebuild.py and depswriter.py scripts into gradle tasks.

Details:
Builder:
In addition to simply combining the required files in order, you can also use the build task to compile the javascript code(task.compile = true, which is the default). Rather that passing the compiler jar file to closurebuilder, this dynamically creates a minifyJs task in order to reuse compiler options specified in the closure extension.

Library:
A 'getClosure' task is added which can retrieve the closure library (which contains the python scripts). The location for where to download the library is 'project.closure.library.location'. If that location exists, the getClosure task is skipped.

Extensions:
I changed the ClosureCompilerExtension to a ClosureExtension, which is completely backwards compatible in the DSL, but seperates the library and compiler configuration while containing them all inside the ClosureExtension.

Example:
I was not entirely clear on how the tests were organized, so I simply created a notepad.gradle config file for the added notepad.js file. If everything looks reasonable, I can commit changes to the Readme.md, too, but I wanted to get some feedback on things, first.