I've looked at configuration samples on github (https://github.com/search?q=dependsOn+asciidoctorGemsPrepare&type=code) to find out how to use asciidoctorGemsPrepare and the way to go seems to make the asciidoctor task depend on asciidoctorGemsPrepare via asciidoctor { dependsOn asciidoctorGemsPrepare }.
When using this in conjunction with the gradle --continuous mode to get continuous build updates while working on asciidoc files the additional GEMs get installed on every save action / continuous build.
This changes the continuous build from taking less than a second to taking more than 5 seconds on my machine which is a really long feedback loop when making quick changes and verifying them.
Is there a way to cache the result of asciidoctorGemsPrepare so it doesn't install the gem on every build?
Is there another way to solve this? Maybe letting an other task than asciidoctor depend on asciidoctorGemsPrepare?
I've looked at configuration samples on github (https://github.com/search?q=dependsOn+asciidoctorGemsPrepare&type=code) to find out how to use
asciidoctorGemsPrepare
and the way to go seems to make the asciidoctor task depend onasciidoctorGemsPrepare
viaasciidoctor { dependsOn asciidoctorGemsPrepare }
.When using this in conjunction with the gradle --continuous mode to get continuous build updates while working on asciidoc files the additional GEMs get installed on every save action / continuous build. This changes the continuous build from taking less than a second to taking more than 5 seconds on my machine which is a really long feedback loop when making quick changes and verifying them.
Is there a way to cache the result of
asciidoctorGemsPrepare
so it doesn't install the gem on every build? Is there another way to solve this? Maybe letting an other task thanasciidoctor
depend onasciidoctorGemsPrepare
?