asciidoctor/asciidoctor-gradle-plugin — pull request #126 by ysb33r (2014-09-13 10:54:23+00:00)
Title: Addressing #108, #122, #125

__Headlines__:
+ Fixes #122
+ Addresses #125
+ Partially addresses #108

__Details__:
* `sources` supercedes `sourceDocumentNames` and `sourceDocumentName`. (#125)
* `resources` added to allow copying of additional files to output directories. (#125)
* Each backend will now write to a separate subfolder under `outputDir`. To have the old behaviour use
`separateOutputDirs = false`. The `OutputDirectories` annotation is used to tell Gradle about the multiple documents. (#108)
* Files specified in `sourceDocumentNames` must be relative to `sourceDir` and fully contained in `sourceDir`, in other words, it's no longer possible to process documents placed outside of the project's sources. Attempts will be made to convert absolute paths to relative paths but conversion will not be guaranteed.
* FileCollections must not be passed as they will not convert correctly to `SourceDocumentNames`. This might be the most controversial fix I have made here, but I believe very few people using the plugin to date have resorted to `sourceDocumentNames=files('a','b')` in their build scripts, so impact should be minimal. (#122)
* Source files that are not reachable from `sourceDir`, will no longer cause a build exception, they will just be silently ignored. (#122)
* Non-source files are no longer automatically copied, unless they are in the `images` folder and `resources` was never called.(#125)
* A lot of refactoring deep down in the gits of `AsciidoctorTask.groovy`. Due to the power brought along by utilising Gradle's `CopySpec` and `PatternSet` instead, quite a bit of the code in this class has gone away.

__What's not in__
No provision for backend specific behaviour has been made. For example, what if I only want to copy images for the `html5` backend, but not for `pdf`? Although this can be addressed in a release if the community wants it, there is a perfect alternative in creating additional Asciidoctor tasks for now.