Closed sboekhoff closed 8 years ago
As a guideline we don't encourage to place sources at the root level, i.e, README.adoc
, as the AsccidoctorTask
will use all directories specified in sourceDir
as inputs, thus addint them to the input cache. this is the reason why your projects build results in and endless loop, as the root dir updatesits cache, which marks it out of date so it does it again, and again.
So, it's not possible to watch single files,...
Now I moved the contents of the README-file to the source folder and included them in ./README.adoc
using
include::src/docs/asciidoc/README.adoc[]
Unfortunately GitLab.com does not execute the include, so only the link and not the processed content is shown in the web-interface (Issue 18045).
Totaly agree with @aalmiray on not building from the root level. And to answer your question, you can only have one source directory in this version of the plugin. The sources
closure is actually a PatternSet
which gets applied to the source folder.
In the experimental new model version of the plugin that @pledbrook is working on, it would be possible to have more than one source directory.
Now I moved the contents of the README-file to the source folder and included them in ./README.adoc
Why don't you just have Gradle copy the README.adoc into src/docs/asciidoc, then remove it when the build is done...or just have git ignore it at that location?
Btw, another approach is to use a second task of type AsciidoctorTask that just manages the root README.adoc. Less ideal, but still feasible.
I'd like to build only
src/docs/asciidoc/
(while files fromsrc/docs/asciidoc/includes/
are not built separately)README.adoc
I thought that naming all files explicitly could be the right way:
Unfortunately, the folder structure is kept for the files built (I'd prefer the have alle built files in
build/asciidoc/[pdf, html5,...]
).But even worse: when running Gradle as continuous build (
./gradlew -t asciidoctor
; http://gradle.org/blog/feature-spotlight-continuous-build/), the build process gets stuck in an infinite loop (probably, because the./build
-folder changes all the time).Do you know a way out?